Hi Raya ... you're new here ... hope you decide to hang around.
If you do, you'll see many orthopedic issues discussed by this board's membership that mix personal use of licensed medical Professionals along with some cynicism about those same Professionals. It's the old "broscience" vs. real science debate. Only difference may be that many of us have felt the pain the Professionals only hear us describe ... when they listen.
With that said, any Professional is likely to ask you more about your post:
Just one knee or both ... if both ... equal intensity, or one worse than the other?
Was the "acting up" relatively sudden onset or so gradual it took you a while to identify you had a problem?
What other exercises besides Squats are horrible, and how much flexion about the joint can you do before the pain begins? (i.e. rock-bottom Squats, quarter Squats, or what?)
How old are you, and how long had you been lifting before this?
Has your training tended to enlist momentum to lift the weight, or has it always been slow and controlled?