Knee pain when performing squats is a common issue we see. Having correct form in a squat is crucial for safety and strength in tons of daily activities so here's a few reasons your squats might be causing you pain, as well as some movements to fix them!
Problem #1 - Knee valgus. This is an inward movement of the knees that is caused by upstream weakness in the thighs. Having this valgus puts a lot of pressure on the joint and ligaments in the knee, forcing them to work harder than they should and taking away work from the muscles
Problem #2 - Forward weight. This takes the shape of knees being in front of your toes, and keeping the pressure of your weight on your toes/front of foot. This takes away work from your posterior chain (glutes) that should be the main driver. Instead it forces all the pressure to the front of the knee.
Fixes - keeping your weight in your heels, torso upright, and knees above or behind toes are all important to proper form. The knees should also stay directly above the feet throughout the whole motion, not deviating in or out. To help with that, strengthening the muscles of the thighs but especially the hips is crucial.