There are certain evolutionary factors at play. The main one is that women become infertile with age, while mrn theoretically never do. It's therefore "in his interest", in terms of having the most children, for a man to favour a younger partner. An older man, however, is probably still fertile, and as long as he's still fit and healthy, his extra life experience is helpful. That's why, biologically, women's attractiveness is perceived to drop off by middle age while for men it lasts a lot longer, until an age where they start to get infirm.
Almost ironically, the fact that humans are at least mostly monogamous by nature and fathers often take part in childcare makes this more of a thing. If fatherhood was just a case of sex and then nothing, there'd be no cost to men finding women of any age attractive, even if they were coming to the end of their reproductive time. Instead, because men naturally invest in their partner and offspring, it makes best evolutionary sense to strongly prefer a younger woman likely to have more children, and healthier children, too.
The human trend towards monogamy also leads to another thing that wouldn't be a big deal otherwise - female-female competition. Because people tend to have few partners compared to other animals, there's a strong incentive for women to appear a better option as a partner than the other women around her, so she can snag the best male. This applies just as much to men, too - male-male competition is just as much of a thing, evolutionarily.
Which maybe all sounds a bit bleak, but it's counteracted in part by some other more savoury processes, mainly pair-bonding, mutual altruism, group cohesion and the fact that it's often evolutionarily more beneficial for fathers and mothers to stick together long after the time for having more children is past so that they can help their grandkids do well.
Anyway, that's just the evolutionary background and isn't really applicable to modern society, or shouldn't be. Back on planet earth...
I think women can grow old gracefully; plenty of older women who don't dye their greys away, don't hide their wrinkles and don't obsess about weight or looking fit, and they still look lovely. They also still all have their have their husbands... Though frankly if a man left a partner for the crime of getting old, well, he's an arse and the woman should see his departure as a win.
I think it comes down to self confidence; if you're not bothered about how other people see you, you won't feel pressured into hiding the signs of aging and you'll naturally grow old gracefully.