Sometimes things can be complex. Especially when it comes to the human body and movement.
Other times there are simple solutions that can save people a lot of time.
The exercise below is one of those.
Find a hip band and pick the one that is challenging, but not too much of a strain.
Test your squat without the band 5x.
Then put the band on and push out into the band so that the middle of your knee is in line with your 2nd toe (our more outside towards the pickie toe). Try 5 reps.
If it feels smoother with the band or less pain, then this exercise is a simple solution for you.
Perform it for 3 sets of 10-20 reps 2-3x/week.