I'd probably use a rechargeable 4S 14.8V Lipo battery for the motor. An L298N drops quite a lot of the supplied voltage so you need around 15V to have a reasonable chance of getting 12V at the motor.
The battery capacity (mAh) needed will depend on how long you expect the motors to run for. And you'll need a proper Lipo charger too.
There are many other options even a 12V lead-acid battery may work.
Steve