A stiff knee after joint replacement can be a difficult problem to overcome. It's not likely to resolve on its own. Patients with poor motion before surgery often have poor results after the operation.
It takes a big effort on the part of the patient to regain motion but it can be done. You'll probably need the help of both your surgeon and a physical therapist to accomplish this.
Besides receiving individual treatment by the therapist, you will have to diligently follow a home program of stretches and exercise. Range of motion will increase but it's often slow going. Be patient with yourself and with the process.
Your surgeon may suggest a manipulation procedure. Under anesthesia, he or she will move the joint through its full motion. Any scar tissue and adhesions will be stretched or broken. Swelling and more scarring may occur if you don't keep moving it. Again, your surgeon and therapist will guide you through this process if it's needed.