That's good advice but will have to say that it is unfortunately out of your control. It has a lot to do with genetics than people want to admit.
I have health and mental conditions that interfere with my mental abilities and makes career progression difficult and it's all due to being born with those.
So yeah do eat healthy and exercise but also be realistic. Some people have it easy and take it for granted, other don't, such is life.
Also some of what may be perceived as cognitive decline is simply being distracted and tired from raising a family. The brain-power may come back later once kids are older and caring responsibilities get less. (though that may not happen if you got elderly relatives to then care for. also from what I hear adult "kids" can be quite a distraction too ;) ). I remember being amazed at my grandmother in her 80s still having such a sharp mind, reading sci-fi, beating others at chess or card games. But of course, she had no responsibilities any more, could have a lie-in if needed, not worn out from work etc. I'd guess she may have seemed sharper mentally at 80 than 50. I have another relative like that too, 80 and very sharp.
It may sound simple, but walking daily, drinking water, and sleeping well (and not too late on either side) are fundamental wellbeing factors.
With these three, cognitive ability is maintained (and improved). Also, if you consume sweetened or carbonated drinks, it’s best to reduce your intake (and perhaps quit altogether). This holds true for coffee and alcohol as well.
Two side notes on helpful factors I’ve discovered:
When walking, it helps to not have headphones on (either music or audiobooks) - allow the mind to decompress.
Similarly, if possible, walk in a park, or any area with clean (-er) air and lots of green. This one depends on your location, of course, and you can substitute green with blue if you’re seaside.
You said it well. One of the things I also strive to do when walking is to focus on things in the distance, especially since I work on a screen all day long.
Yep, opens up the horizon, both of the eyes and of the mind - not that they're necessarily different, but for me it's a very physical feeling in the mind, to move from focusing a foot away to focusing on "infinity".