As others said, we need more description. Read your manual on how to check the transmission fluid.
When is the last time you had a drain and fill. If never or over 2 years ago, get that done.
Do you mean it will not shift any lower ? or any higher? 5000 rpm when accelerating sounds fairly reasonable
What is the red line on it? Could be it shifts shortly before hitting the rev limiter.
Needs tune up
Anybody know why my car is shifting 5000 rpm in second gear while accelerating?