I have done a bit of experimenting with dc motors as generators. The big problem is you need to spin them really fast, and you still don’t get near the voltage they would need to run as motors.
I hope your not trying to charge more than an AA with your 12v motor.

You might be able to charge a Lithium battery, but you'd really want a decent charge controller for that... Stick to ni-cad's. They are the least toxic when they burst...
Cordless drill motors are good. I once got 7 watts (5a @ 1.1v using the 0.22 ohm current sense resistor in my DMM as a load) from a 18v drill motor. Cranking it with a handle from a fishing reel fitted in the chuck. Using the planetary gearbox of the drill helped crank the speed up.

At the cost of some significant mechanical losses. Thinning the grease inside the gearbox helps, but I wouldn’t expect the gearbox to last as long. Still takes a lot of effort to crank with low resistance loads. I cant remember exactly what the voltage I got with higher resistance loads was. Somewhere around 5-6v I think. Cranking flat out with meg ohm resistor.
Voltage was considerably lower with the 12v motors
I did a video about it. Including how to modify the planetary gearbox so that you can crank the motor as a generator. Which is a necessary modification if the donor drill has variable speed.