Core stability is important for a strong squat. Funny thing is, you can build better core stability BY squatting. Try these two variations:
1. The Barbell Zercher Carry or Squat
Sure, it's uncomfortable, you can't breathe, and it forces you to use so little weight that you look weak in front of people. But this is exactly why it's great.
The bar sits right on your diaphragm, stopping you from getting a full breath. This means your core has to work to stabilize the load with less intra-abdominal pressure (IAP) than you'd be able to create normally.
This is especially good for those who tend to be over-reliant on lifting belts. If you don't have room to do loaded Zercher carries then regular Zercher squats will be fine.
2. The Breathing Squat
Credit goes to Greg Nuckols for this. With a light load, drop to the bottom of a squat and take 15-20 full, slow breaths.
The trick here is that you don't have the aid of IAP to help hold your torso position, so a greater demand falls on muscular tension and stabilizers. As an added bonus, the breathing squat increases confidence and mind-muscle connection at the bottom position.