I've found that cutting out sugar and eating more fat (especially EPA+DHA) has made my brain feel a lot sharper. Also strictness with bedtimes and getting natural light and exercise in the early morning get's ever more important with age. However, I agree ageing and family are definitely terrible for you :-)
I’ve found the exact opposite, age has given me greater focus, at 50 I’ve been able to study while working and raising four kids, I was not capable of the same in my 20s
I have theory on this, I don't think I'm worse at remembering (yet!),
I think what matters is the energy you can bring to focusing at the time your absorbing information in the first place. I have to plan to have that energy in advance, doing some exercise the day before so I can sleep, go to bed at 9 pm the night before with one earplug so I can still have an ear out for emergencies but not the snuffles and shuffles of children and pets, get up at five when the house is dark, go outside for a bit - then hit the books uninterrupted in the quiet morning. If I do that, my fifty year old focus is better than I ever had as a 20 year old - but! If I look ahead, at the older generations of my family, I'm confident I've got a good ten years, maybe fifteen, but don't see another 20.
Like many on here, I think I had a high potential - low discipline brain. I was never setting the world on fire, and even if as I age the potential ceiling of my cognitive capacity has come down, it was never an ceiling I was in danger of hitting, and now with a little more willpower I'm getting more out of the (possibly diminishing) total mental horsepower I have, than I ever did as a younger me.