The Myth of Core Stability

I would 1st rule out tightness.
Tightness may have caused your issues.
Foamrolling and Stretching - 1st foamroll then Stretch.
Then do a bodyweight squat to Test - and repeat where you’re feeling the tightness the most.
Repeat untill no tightness is found.

If pain is still present - then find a good therapist.