Get the post thumbnail with wp_query

If you are using this inside the loop of your WP_Query then why are you providing the Post ID parameter in functions. You don’t need to do that.

So your code will become this.

<?php echo '<h2><a href="' . get_permalink() . '">' . get_the_title() . '</a></h2>' . get_the_post_thumbnail( get_the_ID(), 'full' ); ?>

And please read the answer and explanation by @PieterGoosen. He well explained how WordPress functions usually works. And how can you echo the results with get_ prefix.

Also you were using \ before double quote which you don’t need to do here.