Welcome to HCM,
From your symptoms and history it seems that you might be having some injury
or some ligament of your knee joint.
Go for x-ray or MRI
to know the nature of injury.
Avoid more bending from the joint for few days.
Give rest to the joint.
Take some anti-inflammatory medicine for speed up recovery.
If there is no improvement, then consult orthopedic surgeon.
Ok and bye.