Steppers will get very hot, this is how they are designed. Since you are using H-bridges
to drive your stepper you need about 10V to the windings, so 12V supply into the L298
board is correct.
Using H-bridges you won't get much speed from the motor, perhaps 200rpm max,
before its torque drops away.
By the way stepper motors are expected to be bolted onto something that can help
take away the heat, such as the framework of the machine it is part of. Datasheets
normally assume a reasonable amount of heatsinking for a stepper motor.
I assume, since they say it is a 12v 4W motor, that it requires a current of 0.33 amps. It is unusual that they have not specified the coil resistance.
The L298 is a poor choice for driving stepper motors. And it is an old device with a large voltage drop so if you are using a 12v power supply the motor might only be seeing 10v - which may explain why it is missing steps.
As explained in Stepper Motor Basics stepper motors work better with higher voltage power supplies
The difference between 10 and 12V is not very significant, missing steps probably means the motor
either has inadequate torque for the job or is being stepped too fast. You also have resonance issues
if not using microstepping.
HELLO EVERYBODY
THANK FOR ALL THE TIME YOU LOOS WITH MY PROBLEM
I AM NEWBIE WITH ARDUINO
AND I DON'T KNOW HOW USE MICRO STEPPING WITH ARDUINO AND L298N
THANK FOR ALL