<section class="latest-5">
<?php
$args = [ 'posts_per_page' => 5, 'ignore_sticky_posts' => 1 ];
$q = new WP_Query( $args );
while ( $q->have_posts() ) : $q->the_post(); ?>
<article>
<a href="<?php the_permalink(); ?>">
<?php if ( has_post_thumbnail() ) the_post_thumbnail( 'thumbnail' ); ?>
<h3><?php the_title(); ?></h3>
</a>
</article>
<?php endwhile; wp_reset_postdata(); ?>
</section>