The design is fine. You haven’t shown how you probe it. That’s where the problem is. Look at, for example, the current in the load resistor to see that it does in fact work :)

simulate this circuit – Schematic created using CircuitLab

The more usual arrangement, with M1 a PMOS in series with the positive side of the supply, works identically:

simulate this circuit

When asking such questions as a beginner it helps to really show all of your work. After all, you don’t really have the experience to judge what’s important and what isn’t – nothing wrong with that, we all were in that same spot; and still are when learning new things. Had you shown us the plots which you interpreted as not working, it’d have been trivial to point out the exact mistake.
In spice, the “plot” also shows the probe setup - equivalent to selecting points to probe with a multimeter in the real world. Mistakes in measurement circuits are not much different from mistakes in designing the circuit being tested: both lead to “wrong” results.