All motor not working

If the motors move nicely with the encoders disabled, then the stepper drivers are fine. If the encoder wiring is correct (the black and dark gray wires are easily mixed up) and the RAMPS shield is fully seated (sometimes a slight separation can cause a disconnect) then it’s likely an encoder settings issue. It may help to enable the encoder position display while troubleshooting, and you may try toggling INVERT ENCODERS first since the motor connections aren’t keyed on the RAMPS shield. See the encoder troubleshooting FAQ for more tips.

Disabling the encoders is a great motor movement troubleshooting tip, and should be the first thing to try in my opinion.