Welcome to HCM,
It seems that you might have some cartilage
damage or some injury
to ligaments giving rise to this problem.
Consult orthopedic surgeon and get investigations done.
After examination and investigations go for the treatment and physiotherapy
as advised by surgeon.
Do not bend knee joint more.
Do not sit in squatting position.
Ok and bye.