Problems with the right Z axis My 3D printer was working perfectly, but one day I put it inside an acrylic box and put it to work, that was not a good idea, because the Z axis grabbed the box, after that, the Z axis started to rotate strange, I even tried to change the wires between the motors and the drivers, but it didn't work.

I have a suspicion that the drive must have a safety criterion, so when something strange happens it stops sending the necessary current for the stepper to run, if it is possible. Does someone have any tips on how to make it work correctly again? Remembering that the motor that is working in a strange way is the motor on the right side of the Z axis, the motor on the left side looks normal. Below I will leave a video showing how the printer is working, like, if it moves just a little bit with the Z axis, it looks like it works normally, but if I move it a little more, then it starts to get weird.
On this printer, I used a AtMega Arduino, with RAMPS 1.4 shield, with A4988 drivers, &quot;NEMA 17&quot; steppers and  and I'm using the Repetier-host program to control the printer.
Video:
I've had this happen before on various Prusa i3 style printers, especially with my homemade tight self printed POM linear bearings for the Z linear shaft. The problem is that the right side Z axis has some sort of friction caused by a skew frame, probably caused by the incident you had earlier.
You need to check whether the X axis carriage goes up and down smoothly. Unscrew the lead screw couplers or the trapezoid nuts and check the movement. If it catches friction, try solve where it comes from. The friction is causing the stepper to skip steps and causes the unsynchronized up/down movement. Please check if the frame or the rods have not bent, the distance between the linear guide rails needs to be the same over the complete height.