A4988 driver causing motor to lurch on startup or stop of motors

There is generally some motion whenever a stepper motor energizes regardless of the particular driver used, though some drivers do have different methods of being enable that might impact that. There is some discussion about that type of behavior in this thread:

Just going off of the video you posted I am not sure if that accounts for all of the behavior that you are seeing, and I think the answers to your questions mostly depend on the particular motor, driver, and other details of the setup. Unfortunately though, your stepper motor driver was not manufactured by us. (We make our A4988 carriers on green and black PCBs, but not red ones.) That makes it difficult to say for sure what type of behavior you should expect from it, and we cannot help you troubleshoot it since it is likely different than ours.

If you want to try a genuine Pololu A4988, then you can find them on our website, or you can get them from our authorized distributors.

I do have one general recommendation though. It seems like you might not be soldering all of your connections, and some of the soldering on your prototyping board does not look great. Unsoldered connections and poorly soldered connections can cause all sorts of unpredictable behavior, so fixing that might be a good place to start. If you have trouble, the Adafruit Guide to Excellent Soldering is a great resource.

- Patrick