It acts as if the endstops are not working.
When you run an M119. Manually trigger the endstops and see if they report triggered when you are holding it. And make sure that on the ramps, the endstops are in the correct location: the min enstops. From the left to the right, the endstops go x min, x max, y min, y max, z min, z max.
When you run an M119. Manually trigger the endstops and see if they report triggered when you are holding it. And make sure that on the ramps, the endstops are in the correct location: the min enstops. From the left to the right, the endstops go x min, x max, y min, y max, z min, z max.