Amplify Square Wave with Simple Mofset Circuit
Strange circuit: -



If it is a P channel MOSFET then that's OK because source connects to +12 volts (via a resistor whose value is unspecified) and the drain connects to the load BUT, to properly drive the gate, the gate levels have to be 12 volts (MOSFET off) or gate at say 6 volts or less to turn the MOSFET on. Clearly this is not achieved with the Arduino output.

If the MOSFET is N channel then the body diode will conduct and the load will be permanently powered by about 11 volts minus the volt drop across the resistor in series with the source.

Neither will do what I think you want.