I think you’d need to get the actual page object and find the ID from there. Then, you can pass that ID to the_post_thumbnail()
, otherwise I think the ID of a post in the loop will be used, not the actual home page. Try this $page_object = get_queried_object();
to get info about your home page.