Twice I’ve had a similar problem.
One, when going up a hill the car lost power and wouldn’t shift. I thought the transmission was gone.
Another car started and ran fine but wouldn’t go over 10 mph.
Both times it was a plugged exhaust system (catalytic converter and/or muffler).
Tested by dropping the exhaust pipe at the exhaust manifold.
Both times the cars then ran fine.