Keep in mind that all 4 of the quadriceps muscles insert into the quad tendon superior to the knee. So, whenever knee extension is involved all 4 of the quad muscles contribute to the movement. Because the rectus femoris also crosses the hip joint, it is also a mover for hip flexion.
To fully engage the medial vastus, be sure that the exercise overload take the knee to full extension. Karin refers to it as “terminal knee extension.”
One of the best exercises I know is performing the last 45 degrees of knee extension on a seated knee extension machine for 10-12 RM.