You we use get_the_post_thumbnail_url(); . You can use this inside loop or outside loop. If you are using this outside of loop then you have to pass post ID otherwise its optional in case inside loop.

BY Best Interview Question ON 02 Jul 2019