Instead of using $post, how do i get the thumbnail image of the $post

To grab the img tag as a variable:

get_the_post_thumbnail ( int $post_id = null, string|array $size="post-thumbnail", string|array $attr="" )

or if you want to outright echo it:

the_post_thumbnail ( string|array $size="post-thumbnail", string|array $attr="" )

Most things like the post content, excerpt, title etc, are acquired using functions like this so that filters and hooks can be used. I’d recommend you use the get_ versions rather than the the_ versions, so that proper escaping and sanitisation can be applied

Further reading: