Hi, my name is Paul & I will try to assist you
It sounds like either the engine or the gearbox has gone into limp mode - this happens when either system detects certain faults
If the transmission is still shifting through the gears then it is likely that the engine has a fault - if however the transmission is stuck in one gear & not shifting then the transmission is in limp mode
in either case the first step in diagnosing the problem is to have the car checked on a diagnostic tool such as Mercedes STAR to see what fault codes are stored - this will help pinpoint the cause of the limp mode
There are various different issues that can all cause the same symptoms so it is very important to find out what fault codes are stored
Let me know if you need anything else.
Best regards, Paul