Stepper motor Nema 17 stuck when power is supplied

Did you Ohm out the stepper coils to make sure that they are connected to the driver properly?

Post a schematic of your wiring.

Post photos showing the wiring.

Post photos showing the switch settings on the driver.

Post your test code. Read the forum guidelines to see how to properly post code and information on how to get the most from this forum.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.
Post a schematic. How to make a schematic to post.