Try the below code. I think its working.
<?php
$args = array(
'post_type' => 'post',
's' => $searchinput,
'posts_per_page' => '3',
'paged' => $paged
);
query_posts( $args );
$posts= get_posts( $args );
if ($posts) {
foreach ( $posts as $post ) {
setup_postdata($post);
?>
<div class="chinaseredivs">
<a>
<?php
if(get_the_post_thumbnail( $post->ID, 'thumbnail' )){
echo get_the_post_thumbnail( $post->ID, 'thumbnail' );
}
else{
echo '<img src="https://via.placeholder.com/350x150" />';
}
?>
<h3 class="chinasearchrepost"><?php the_title(); ?></h3>
<?php
$content=get_the_content();
?>
<p class="chinasearchrepost"><?php echo wp_trim_words($content, 40,'...'); ?></p>
</a>
</div>
<?php
}
the_posts_pagination( array(
'mid_size'=>3,
'prev_text' => _( 'Back'),
'next_text' => _( 'Next'),
) );
}
?>
]]>