Had my knee replaced in 2016.
1) Get a copy of all of the recommend post operative knee exercises from a physiotherapist.
2) start doing those exercises now. Even if it hurts, build up muscle now.
3) Your leg will lose 40% to 90% of strength and mobility during the operation depending on how strong your quads are
Yup, I gotta be careful with my new "low bidder" knee.
But I can walk. I take care of it, no twisting, no bungee jumping, nothing that pulls on the knee.
The more you exercise before the operation, the quicker and easier the recovery.
ANd it is worth it