Welcome to the forum! It is wise to ask about motor wiring.
It does not damage the A4988 if a motor is not connected. However, attempting to change wiring while power is connected will instantly destroy it.
Do not use breadboards for motor leads, motor power supply connections, or other high current connections. The tracks will burn, leading to intermittent connections and destruction of the A4988 motor driver.
Finally, be sure to set the current limit correctly on the A4988. If you bought yours from Pololu, follow their instructions. If you bought a clone, you have to know what current sense resistor is used, in order to set the current limit correctly.