I have replaced a motor in a 12V one before (pre-COVID). They are a real pain
to get open but once you can, you need to buy a dual shaft 12V motor. It must
be dual shaft otherwise you can only power one pair of the wheels (front or back).
I found one on aliexpress years ago. If you can, remove the worm screws from
the original axles. I couldn't but found some from a box of spares from old
electronic toys that were a good enough fit for the screw pitch and hot glued
them. The motor modern I got was a bit smaller than the original, so again some
hot glue helped pack out the casing so the motor was centred correctly.
It is worth testing the motor once disassembled as it might be the contacts that
are either very dirty or worn rather than a dead motor (2 out of the 3 I have
opened were like this).