Do not do all at the start. You should use a simple circuit at the start of modelling.
Why do you specify and use IRFF230 ?
I will take me some time to make a .MODEL IRFF230 VDMOS( . . . )
Use another model until IRFF230 is available. I use IRFH5300.
The IRFF230 is in a TO-205AF (TO-39) package. It has low power.
A Mosfet is low power only when zero current with voltage, or zero voltage with current.
Your mosfet circuit is unusual. You must use pulse control of the gate. I have changed the circuit.
I have LTspice. See the attached circuit.
When M1 turns on, R1 limits the current through the transformer primary to I
p = V1 / R1 amp.
When M1 turns off, D1 conducts current through L1 to prevent voltage spike.
I do not understand your switch connections.