if ( have_posts() ):
while ( have_posts() ):
the_post();
// EXERCISE! Insert here template tags
$rel_query = new WP_Query([
'category__in' => wp_get_post_categories($post->ID),
'post__not_in' => [$post->ID],
'posts_per_page' => 3,
]);
// EXERCISE! Insert here $rel_query loop!
endwhile;
endif;