Hides long list of ethical problems with the concept
Men are (within reason) considered handsome in media even in old age. Wrinkles and gray hair can be seen as sexy (again, within reason), but only in men.
Women are discarded or relegated to sexless granny roles (except maybe for comedic purposes, where sexuality is the butt of a joke). Actresses are replaced by younger women because they are not sexy enough even when their male equivalents aren't (looking at you, Top Gun: Maverick).
I'm not saying there aren't exceptions in particular movies that deal with this topic; I'm talking about the general trend.
Women are different. It ranges — alot, and is more about EQ and scarcity. If you have a moderate baseline level of physical attractiveness, moderately fit (Jon two miles let’s say), not an asshole, and not living with mom, a 40-60 year old guy is a hot commodity.
This could be natural selection acting against us, but since modern society is artificial anyway, why not make an effort to combat it?