You need to watch this video: https://www.youtube.com/watch?v=89BHS9hfSUk
Another problem might also be a broken connection with the motor. A single disconnected wire can cause the motor to behave wrongly.
You should get at least 1 stepper driver working properly and test all the motor cables on that.
Then rolling out all the possible problems using the same stepper driver attached on each of the motor connections.

I change the pins.h on the firmware to point the pins of motor that I want to test to the Extruder0 and then simply send extruder movements on the G code. But this is because I have a delta printer and I can't move only 1 motor at a time. With your cartesian printer you just pick the X or Y movement and test the motors directly on one of these.

Ty for suggestions.

I found the error. I forgot to change jumpers under DRV8825 to 32 steps. Now they works all excepting Z motors. They are 32 steps too?

I put the two motors on Z and E1 as original board, but first question is: is not better to connect both on Z DRV?