How do I correctly power the l298n motor driver with 6v?
Why do you have 12V on the battery?
Pin 9 of the L298N should be 4.5V to 7V for the logic.
Pin 4 is the 6V for it to power the motors.
Connect the +6V to pin 4 and pin 9 and the ground of the 6V is 0V for pin 8. Pin 1 and pin 15 should also be connected to 0V.