The item ID for Magnesium in Subnautica is:
magnesium
Mg. Combustible metal.
We don't have any copyable spawn commands available for this item. The following pages may be helpful: