To model a real power MOSFET like an IRF530 you need to change the N MOSFET specification in your simulation.That is not a part of any assignment. I am trying to build a DALI controller for lightning and I require to control 18V with 3.3V logic. My apologies, let me upload the pictures again:
View attachment 179687
View attachment 179688
With this configuration, the lightbulb is also constantly ON and doesnt change if I press the switch