Here are some corrective exercises you can do to activate your glute med / min.
Collapse knee inward?
One of the common mistakes by doing lower body movement is collapsing the knee inward. Weak glute med / min muscles may contribute to this falsy movement. During the movements such as squats, lunges, the knee should be aligned to the toe all the time.
How can you fix it?
It may be weak or not firing. You need to strengthen the muscles or educate your body how they should be done.
Squat with resistance band
This is probably the easiest one to do. Wearing a resistance band around your knees makes your knees go outward. Eventually, your body will learn what is safe for your knees without the band.
Lunge with resistance band
One of the common mistakes by lunges is also knee collapsing inward. It may be easy to do this in front of the mirror so you will know your knee is aligned with the toe.
I introduce this one but it may be too hard to start with on your own. During the personal training sessions, I can guide you how you should perform step up safely.