I downloaded a simple code online to test the motor, but I'm not sure why the motor is not turning at all. It only has some weird sound, but other than that is not working.
I believe the wiring and coding are correct, so I really confused.
The next step could be to get a more appropriate stepper motor driver like an A4988 or DRV8825. The L298 is really inefficient and does not control the coil current like the modern drivers do.
^^ Yes, because an L298 will eventually burn out the motor if you use a supply higher than 9volt (assuming the L298 itself will drop ~4volt@1A). This stepper has 1A/4.9volt coils.
A current controlled stepper driver, and a 12volt (minimum) supply is needed for this motor.
Or even a 24volt supply if you need torque at higher speed.
Leo..