Have someone look at your technique when squatting.
There may be a technique deviation which is causing the pain.
If you are working in new ranges you could be accessing muscles you have not used in the past to perform the movement. Improving your knee position when squatting will help.
Some episodes that hit on the knee:
Pro Episode # 31 – User Request Friday – Live from The Games: Patellar Tendonitis
Voodoo Band Your Patella Femoral Pain
Wonky, Beat Up Joint? Feed That Thing Good Mechanics and Some Slack
Episode 344: Compression Tack and Floss–The Knee
Episode 163: Knee/Ankle/Achilles Issues? Active Tack and Stretch
Episode 107: A Friend Calls With Knee”itis” Below the Patella
Episode 33: FGB Push Press Prep ; Hot Patellar Tendon: Hip /Calf/ Hamtsrings
You can start with a box squat and lower the height of the box you squat to as the technique improves.
You want to establish proper technique and movement patterning for the skill first.