I felt the same process creeping on me in my late 30s. Since then, I started experimenting with some OTC drugs (to be concrete: Nicotinamide Riboside, Pterostilbene and Spermidine). It is my impression that the effect has largely gone away. People that I meet after a long time tend to remark that I am noticeably more energetic, too.
A combination of NR and Pterostilbene under the name EH301 was recently trialled in Spain for treatment of ALS (yes, that ALS) with remarkably good results [0], though the study was small. A much bigger study is now underway in Norway [1]. If this combo can influence a neurodegenerative disease positively, it may help the brain in general.
But I do not want to sound as a huckster for both. This is a huge if and it is possible that I am just another case of a placebo effect.
[0] https://www.alzforum.org/news/research-news/small-trial-eh30...