Pain and swelling can be because of plenty of reasons. Needs to be evaluated
a) it can be inflammatory like gout (
uric acid) or seronegative arthritis
b) it can be degenerative like osteoarthritis
c) it can be traumatic
Do ice fomentation
Don't bend Ur knee much
Need few blood test like uric acid levels , ESR,
CRP, XRay of knee (AP,lateral)