The item ID for Metal Sensor in Subnautica is:
lootsensormetal
Detects and displays local metal signatures. Seamoth/Prawn compatible.
The spawn code for this item is:
spawn lootsensormetal
The item command will add this item to your character's inventory. The item command for Metal Sensor is:
item lootsensormetal