Stepper not working with 12v but works with 5v

I have a nodeMCU programmed with Arduino IDE, a L293D motor shield and a NEMA 17(17HS4401) 12v version stepper motor.

When I use the stepper.h library one revolution code
(https://www.arduino.cc/en/Tutorial/StepperOneRevolution) and power the motor with 5v everything works fine.

Now if I do the same with 12v the motor turns just a little, makes loud noises, vibrates and the L293D chip gets very hot. I know that the vibrating issue seems like wrong wiring but it can't be as it works with 5v.
I also tried another stepper library but the same thing happened.

The motor shield is rated at 4.5-25V.
Tried two different power supplies, rated at 3A and even 10A.

Product links:

NEMA 17 stepper

Motor shield

A programming error or a physical error? What could the cause be? What to try next ?

You need a stepper driver, not an H-bridge, to drive a low-impedance stepper. Something like a DRV8825.
Your motor is 1.5 ohms, so trying to anything at 12V is going to overload something!

Such motors require constant current drive, not constant voltage, hence the need for a constant current
stepper driver like the DRV8825. With such a driver you'll be able to run at 12V, 24V, whatever the
relevant chip can take and the motor gets the same current. Higher supply voltage translates to higher
top speed.

Hello,

power the motor with 5v everything works fine.

But the stepper motor didnt have a torque, just running a logic program

Now if I do the same with 12v the motor turns just a little, makes loud noises, vibrates and the L293D chip gets very hot.

The voltage that you input to the l293D IC is too high.Even you give a heatsink on. It still can easily get hot. Changes your motor stepper driver.
I suggest you use TB6600 stepper motor driver
Check this
TB6600_Stepper_Motor_Driver_SKU__DRI0043-DFRobot

MarkT:
You need a stepper driver, not an H-bridge, to drive a low-impedance stepper. Something like a DRV8825.
Your motor is 1.5 ohms, so trying to anything at 12V is going to overload something!

Such motors require constant current drive, not constant voltage, hence the need for a constant current
stepper driver like the DRV8825. With such a driver you'll be able to run at 12V, 24V, whatever the
relevant chip can take and the motor gets the same current. Higher supply voltage translates to higher
top speed.

Thanks for pointing at the DRV8825 motor driver. I had a look at it and it seems to be working differently than the H-bridge. With the H-bridge I had four wires connected from my controller to the H-bridge and the sample code posted above worked.
It seems that with this driver things are different and this code will not work, am I correct? Is there any code for easy testing?

These links may help
Stepper Motor Basics
Simple Stepper Code

...R

It seems that with this driver things are different and this code will not work, am I correct? Is there any code for easy testing?

Have you check this page?