$previous_post = get_previous_post()->ID;
$next_post = get_next_post()->ID;
echo get_the_post_thumbnail( $next_post, 'thumbnail');
next_post_link();
echo get_the_post_thumbnail( $previous_post, 'thumbnail');
previous_post_link();
<?php the_posts_pagination( array( 'mid_size' => 4 ) ); ?>