I presume you mean A4988
A lose wire going to the stepper could do this... or a stepper wire touching together....
Or plugging the A4988 in backwards or out by one pin..
No way to tell if anything else got damaged till you replace the A4988 and give it a try.