Hip Problem

About two weeks ago doing lunges. I felt a pop in my hip and ever since it’s been terribly sore. I’m curious what it could be. When I notice it the most is when I’m trying to rotate my hips like in my swing or in my drive off my back leg when I throw. It’s been killing me and taking away all my drive hitting and pitching. Anyone have or have had this problem? Is it a hip flexor?

i had pain in my hip and it was limiting my movement. whenever i did leg swings out ot the side it hurt and it was like the hip was popping or catching on something. it ended up being a torn labrum around the hip socket. had surgery to reapir it. surgery sucks but its doing much better now.