@nerathul back on-topic, check the resistance of each phase of the stepper motor with a multimeter. It could be that the wiring internally has failed; rare, but I've had this happen. See https://docs.duet3d.com/User_manual/Connecting_hardware/Motors_connecting#identifying-the-stepper-motor-phases
The resistance should be about the same for each phase. Check against another motor or the motor specification. It's not always the Duet that fails!

Ian