Most of the research says you can not target a specific part of the quads, they all work together. But supposedly the VMO section (inner part of the quads becomes more active in the last 30 degree of knee extension so theoretically it may not get worked as hard with cycling if your not getting good knee extension on down stroke of peddling.
Just my opinion as I have not seen you so hard to say if what you are doing is appropriate for you but sounds like your heading in the right direction. so long as your technique is good squats are fine, great for building leg strength. Can also make quite hard with minimal equipment. However, if you have access to weights, I personally would focus on deadlifts as the lift is technically easier than a squat (most people squat technique sucks), you work the gluts which is often poorly developed, you do not get so much knee bend so is a bit kinder to a painful knee but still get to work the last bit of knee extension that may not be worked very well cycling (unless you stand a lot)
You have not said, but I am guessing your pain is coming from the front of the knee (Patella femoral pain). If that’s the case try not to aggravate it to much as it is a git to get rid of once established.
As said, bike set up is very important so might be worth looking at that and if your peddling technique is good, and try and use higher cadence as can be bit kinder on the knees when pain present.
You could also look to see if you have any trigger points (google quad trigger points if interested) that may / may not be contributing to pain.
Hope your knees get better soon.