Fast switching of a 24V valve
You must have a free wheel diode from the MOSFET output to ground, to catch back EMF. Using a TVS for that isn't a bad idea, since that will also catch various EMI spikes.