I am designing a 2 resistor MOSFET amplifier but the output is generating square waves
Try putting a resistor between source and ground:

Play with the ratio between R3 and R2 to adjust gain and with the DC offset on V1 for input range to get a feel for how the MOSFET works.  Notice that your output is inverted.
Good luck!