NEMA17 Stepper motor not turning, but making very little noise
I don't have the "reputation" to comment.....but, are the grounds (12-volt ground and Raspberry Pi ground) connected together?  They must be!