Driver L298N not working

Firstly don't try to power an Arduino from a motor supply, its fraught with issues.

Power the Arduino over USB or similar, power the motor supply to the 298 from your battery pack.

The logic supply to the 298 can be the 5V of your Arduino, but then never power the Arduino
without the motor supply present or you'll pull large current from the Arduino internally
in the L298, which is bad. (There's an internal path for current that is not intended to be
used like this - power up motor supply first, then logic supply, power down in reverse sequence).

Measure the supply voltages, make sure they are correct. Try with one motor first, check
both channels of the L298. Measure the current taken, make sure you're not overloading
the L298.

Never power anything up without double-checking all connections - this is a common
beginners error - you need to methodically check everything because a careless error can
easily lead to problems or damaged components, which is very annoying, but avoidable
if you are careful.

If you have access to a bench supply with adjustable current limit, this is great, it means
you can test a circuit with the current limited, often protecting against damage if something
is wrong.