Z-axis freezes after a cut

I had to put together the maslow cnc for a university project. The Z-axis doesn’t want to raise after cutting. I presented by just cutting out a square and it worked perfectly but once it was done and time to raise the bit it just froze. I go back a few hours later and try to raise it up and it works just fine. I don’t know if it is over heating or just a bad motor.

can you post your gcode?