You mentioned powering VDD from 3.5V (I suspect you meant 3.3V) with the Arduino, but the logic signals that Arduino Unos send are 5V, so you should power VDD with 5V as well. Looking at the A4988’s datasheet it seems like that is probably okay, but please note that for many other ICs it is possible to damage digital pins or the whole chip if they are supplied with signals of higher voltage than their power input.
Other than that I do not see anything wrong from the picture.
“I switch the 2a and 2b around and it will turn one direction.”
To clarify, when you switched those motor wires did the motor change direction?
Could you try connecting the DIR pin directly to GND and 5V and see if that helps?