IRFZ44n MOSFET Won't work
A MOSFET doesn't have gate current, except when the gate voltage is changing.  When your switch is closed, the gate charges, and when the switch is open, the gate stays charged and the device stays on. You need to provide a way to discharge the gate to turn it off.  You also need to provide a path (such as a diode in antiparallel with your magnet coil) for the coil current when the MOSFET switches off, otherwise the coil inductance will cause a voltage spike that will avalanche and eventually destroy the MOSFET.