Open graph image confusion

Hi, I’m quite confused with the setup for the open graph image. I have used the following in the headers in order to set up the og image for the home page however, it is now using this image for every single page on my website. How can I make the following work only for my home page? Thanks a lot.

Use a conditional and check for .IsHome:

Or, only load the code in a partial or block that only loads on the home page: