Header tags are setting up in Body

When I’m adding custom code to header block it is setting in Body.

Any idea how to resolve this ?