The item ID for Magnetite in Subnautica is:
magnetite
Fe₃O₄. Metal oxide with magnetic properties.
The spawn code for this item is:
spawn magnetite
The item command will add this item to your character's inventory. The item command for Magnetite is:
item magnetite