I think hydrogen is actually a metal with a very, very low boiling/melting point. If you can cool it off enough to “freeze” it, it would be a metal.
Or, if you could put it under enough pressure you could do the same (since applying pressure increases the boiling point).
Near the center of the sun the hydrogen is a plasma. Or a degenerate state. This also allows it to act as a metal.
Personally, I am not sure off the top of my head if it is the pressure or the degenerate state that allows the magnetism, although a quick Google search would probably answer that. I’ll let you do that.
Thanks, both! For links and for info.