Mobility is the ability to move freely with control. The "with control" part of that definition is important. It's what differentiates mobility from flexibility.
What is flexibility? Flexibility is the ability to move through full ranges of motion. There is no "control" component to flexibility, but that doesn't mean flexibility isn't important. Let's dive deeper...
A lot of us lose flexibility when we spend too much time being inactive (sitting at a desk, commuting to and from work, etc). Our bodies adapt to the positions we stay in the most- If, for example, we sit with a slouched posture multiple hours a day, eventually we lose the ability to sit or stand up straight and keep our shoulders back because our body has adapted to that slouched posture position.
We can improve our flexibility in the same way we made it worse... by allowing our body to adapt to a new position. The only difference is, this time we will be getting our body to adapt to good posture instead of slouched posture.
How can we do this? Stretching. Stretching can be done in many ways; dynamic stretching, static stretching, partner stretching, PNF stretching, etc. How and when to do each of these styles of stretching is a topic of discussion for another time. What's relevant to this topic is that stretching is the method by which you will get your body to adapt to new positions and allow you to move with more range of motion in the future than you can right now.
If your goal is to increase your flexibility, you have to stretch A LOT. How much is a lot? In my experience, you won't make a lot of progress without stretching very thoroughly (at least 30-60 seconds each side if we're talking static stretching) and with intention (not just zoning out while sort of holding a stretch) at least once/day. If you're looking for major progress, you should probably stretch 2-3 times per day. This also happens to be most physical therapist's recommendations for stretching frequency, which makes sense because they are trying to bring your body back to balance and alleviate your pain as quickly as possible.
Here's a thought experiment... We were all kids once. We used to be a lot more flexible than we are now. How much time do you think you spent/spend in the body position that got you tight? It seems foolish to think that we can undo all of that time by going to a stretching class once or twice/week. Remember, our body adapts to the positions we stay in most.
Flexibility is great, but it doesn't isn't the end goal. Lets go back to the concept of "control". Flexibility without control can be a risky place to be. Attempting to use your newly acquired ranges of motion by doing something like lifting a couch could be a recipe for an injury. So how can we gain control over our newly acquired ranges of motion?
The answer is strength. But not just any kind of strength... strength through full range of motion. That means instead of squatting until your thighs are parallel to the ground, squat as low as you can while keeping your spine rigid. In the case of the squat, a great goal for optimal movement would be to have the ability to go below parallel.
Your body is comfortable moving through ranges of motion that you have control over. If we can do resistance training through full range of motion, we will be training our body have control through full range of motion and therefore feel comfortable moving through full range of motion.
Improving our flexibility got us halfway through the journey toward better mobility. Resistance training through full range of motion is what completes the journey to greater mobility.
Getting your body to adapt to something new requires stimulus. That stimulus needs to be a loud and frequent signal to the body saying, "this is our new normal... lets change to be better at it." If we can communicate that message to our body with stretching and resistance training through full range of motion, it is surely to reward us with better mobility.