This is almost exclusively caused by tightness in the anterior portion of the hips.
Typically a combination of all 4 hip flexors: TFL, Psoas, illiacus and Rectus Femoris. Some people don't consider the Rectus Femoris as hip flexor b/c it is actually a quad muscle, but I assure you it flexes the hip and you use it every time you pick up your knee.
Mobilization and stretching is absolutely pivotal in this situation.
Here are a few of the main stretches we use.
This is a simple hip flexor stretch however I often see people not doing the it justice.
Tightening the abdominals and glutes will increase the precision of the stretch.
This stretch will also behoove those w/ TFL and Psoas issues much more than people those w/ rectus tightness.
And it's convenient when working at a desk for continous amounts of time. Throw a pad down and switch knees every 15 minutes or so.
You can also use a box to create a deficit
Creating a deficit like this forces the hips closer to a neutral position causing the opposing muscle groups to stretch each other.
Here we're going to be stretching much more than just the hip flexors. We'll get some hamstring and adductor as well but will greatly increase the stretch and learning curve for the stretch from the above example.
The Rear Foot Elevated Hip flexor stretch can be done multiple ways. At GRIT we almost always use the wall.
If you have rectus tightness you'll know right away w/ this one. We use it w/ every athlete and every workout.
The Rear Foot Elevated Hip Flexor Stretch targets the rectus femoris (not exclusively). As you can see by its attachment points. Just by elevating the back foot we greatly increase the stretch through this muscle due to its nature as an extender of the knee.
We can also group these stretches.
I feel like you get more out of the stretches this way but some people are just plain not flexible enough to get into position in order to perform it.
I call this the Rear Foot Elevated Hip Flexor Stretch from Deficit. Longest name of any stretch I've come across yet....just sayin.