Okay, I'd like to know what kind of transmission it is.
If it's a manual transmission, the causes could be:
clutch failure,
faulty synchronizers
, broken gears
, defective shift forks
, or bad oil.
But if it's an automatic transmission:
faulty shift inhibitor,
loose shift cable,
governor (if it has one),
or modulator (if it has one).
If it's a modern transmission:
input and output RPM sensors,
incorrect lubricant,
faulty clutches,
faulty brakes,
inadequate lubricant pressure,
faulty solenoid valves,
a damaged pump, or
transmission filter fatigue.
It's also possible that if the transmission computer doesn't recognize the speed, it can't calculate it and won't shift gears.
Well, these are some of the parameters I recommend checking. Goodbye.