I have some knee instability as well. It caused me to have an injury as a teenager where my patella subluxated and tore/strained my meniscus. I had to do PT and during the treatment, they went over all the exercises I should do to build stability around the entire joint.
There was a lot of focus on strengthening the quad muscle. Hamstrings were involved too, but I would say that I was doing more quad work overall. It wasn't anything complicated--mainly I remember my therapist saying that if I spent 30 minutes on a stationary bike (with resistance) everyday, he'd be happy. That's going to do a lot of work on the quads, but a lot of accessory muscles as well.
My patella has subluxated multiple times since then, but now that I've started working out regularly and lifting heavy, it hasn't happened in quite some time. I would really recommend talking to your doctor about your knee problems and see if physical therapy might be helpful for you, because everyone's bodies are different.