9V batteries so there should be enough voltage
Are you trying to power motors with a rectangular 9V battery like for smoke alarms? Those may have the voltage, but cannot supply very much current.
What is the rated voltage of the motors? What is the stall current of the motors?
//power both Motor
digitalWrite(IN1, HIGH);
digitalWrite(IN2, HIGH);
digitalWrite(IN3, HIGH);
digitalWrite(IN4, HIGH);
You should check the truth table for the L298. Both motors are stopped with that code. Look toward the bottom of this page.