I’ve had this happen on occasion.
For me, it has occurred when I significantly step up the elevation gain of my tours quickly at the start of a season. In the field, I have “rolled” my hip flexors and quads with my skip pole and used the classic lunge stretch while squeezing my glutes hard. This seemed to help.
At home, I followed up with a soft ball on the iliopsoas, quads (esp. rectus femoris), and TFL.
Hope this helps,