I'm not 40 years old, but I've seen people turn 40 and their sudden change of lifestyles. Not because they desired change, but because they suddenly had a certain realization that forced them to adapt to a new life. People say life begins at 40, not only because they've learned and lived for 39 years but because they gain more knowledge about life than people who are younger.
There's an African adage that says, " what an old man sees while sitting, even if a child climbs a tree, he wouldn't see it".. To them, being older was more than just wisdom, it was foresight and this comes from years of interacting with life and the people in it. Age may be a number, but one's interaction with life in those numbers is a testament of survival, strength, and knowledge.
At age 40, the first realization is that nobody actually cared about what you do. While you felt like the world was watching you and that you needed to make certain impressions, you'll be disappointed to know that everyone was about his business and no one actually cared about your impression and the act of perfection. It looked like it, but no one cared in the real sense, everyone was about himself and the result.

Image generated using Gemini AI
The second realization is that privacy is key. Most people withdraw from people and have fewer friends while choosing to enjoy some peace and quiet. Older people in their 40's suddenly start to seek a private life, enjoying their company more than the company of friends. While the young seek parties and chase after recognition, the older people seek privacy and the need to enjoy their quiet time with something they love.
Finally, the last realization is the need to serve. This might not be for everyone. But most people suddenly want to contribute to something. Even if they were once idle and love the comfort of their cozy bed, they suddenly want to work. It can be as simple as keeping a garden, picking broken items at home, or going out to work, but sitting at home becomes a torment for them.
I am not forty yet and may not be completely accurate in this judgement, but one thing I've learned from this is; To live our best life and be ourselves, work hard and build our own dreams because in the end, no one cares about you and you are your own responsibility.