Heading tags are block-level elements, which means it will occupy as much horizontal space as possible. If you look at it in your dev tools you’ll see that it takes up the entire width of the view port, so using auto margins on it won’t do anything. What you can do is center the text in the <h1> using text-align.
Bear with me here, but I am assuming that you are referring to the Inspect Element section. From the little that I know about this part of the browser, I assume that you are looking at the Styles section and yes, I do see that the h1 and the image both occupy the entire width.
Since the img element did get centered, I guess that it is not a block level element and thus is good with the margin: auto command to center it.
You are correct, the <img> tag is inline by default and so auto side margins will center it.
And yes, the Inspector is what I was referring to. Get used to using that and all the other developer tools provided by the browser. They are going to be your best friends.