Flexibility and mobility are two different concepts, although they are often confused as being the same.
Flexibility is the capacity of a material to deform without breaking and regain his initial form after the force that cause it to deform stops to apply any pressure on it.
Mobility is the capacity of a mechanical part to move unobstructed by anything.
Often when people lose their mobility in their joints, they try increasing the flexibility of that joint in the hope that it will become more mobile.
This concepts are not synonymous, you can have a flexible and immobile joint. You could be as flexible as a contortionist and still have a low amount of mobility in your joints.
The loss of mobility happens do to the misalignment of the joints, for example if your pelvis is tilted to 30 degrees forward when it is in a neutral position, your capacity to bend forward from the hips is going to be decreased by 30 degrees.
If you stretch the hips you are going to increase the amount of flexibility you have in the hips but not the mobility of the hips.
Your hips are going to be able to deform without breaking any tissue and be restored to their original shape but they are not moving unobstructed by anything, because your pelvis is still tilted at 30 degrees.
In order to actually increase mobility in that joint you would have to realign the pelvis so it is in a neutral position when your hip joints are completely open.
And your pelvis is probably misaligned do to the joint equilibrium overcompensation principle.
So working with the muscles around the hips and legs won't change the alignment of the pelvis and hip joints, just increase the capacity of those muscles to deform without breaking.
Mobility is more important than flexibility, you could argue that being flexible is more of a party trick than everything else. If you are very flexible you can do some yoga poses take pictures of it and upload it to your social media page to get a lot of likes.
Mobility on the other hand it is a matter of health, if you want to be able to tie your own shoe laces when you get old, do all the activities that you enjoy and be free of pain, you need to remain mobile.
You need to have a propper body alignment inorder for your joints to be able to move unobstructed by anything.