I agree with all of the above (so far) and add these:
Good Nutrition (although it's debatable what that "Good Nutrition" is. Since we never fund definitive research on nutrition, everyone will continue to argue about it endlessly). Maybe young people, could be argued, can get by with poor nutrition, but as time goes on and youth wears off, the (cumulative) effects of nutrition will have an effect on cognition. A healthy diet that preserves the vasculature to your brain will be better than a poor diet causing restricted blood flow, elevated inflammation, mini-strokes, strokes, etc.
Fasting. I hope this isn't venturing into "unproven" territory. But I think it seems to be pretty well established that when fasting, the body starts cleaning up a lot of molecular messes, looking for cellular rubbish to burn. Fasting should help the vascular system, so this synergizes with the Good Nutrition point above. The optimal fasting regimen is, as far as I know, unknown. For about a year I've been doing "Intermittent Fasting". I do "IF" because I believe it manipulates my hormones in a beneficial way, for good health and longevity, compared to eating all the time. Trypically, after dinner around 6 pm, I don't consume any calories or any artificial sweeteners until about noon the next day. The only exceptions to fasting that I make are for having some whey protein powder (unflavored, unsweetened) and/or a small amount of MCT oil.
MCT oil: (MCT means medium chain triglicerides). This entry is perhaps debatable, but I can provide good justification. If you don't know, MCTs are absorbed and processed substantially differently than typical long-chain fats. MCTs are mostly unusable for fat deposits or building molecules. Mostly, MCTs go straight to the liver and are rapidly processed into ketones, which are used for energy, even in the presence of carbohydrates. My regular diet is non-ketogenic, that is, I consume carbohydrates, so generally my brain is running on glucose. For a few hours after consuming MCT oil, my brain is running on glucose plus ketones. So I justify this entry by pointing out that the brain is an energy hungry tissue, and by giving it an additional source of energy, I can push harder to learn new things, when I would have otherwise not had the energy to push harder. I don't just automatically take MCT oil all the time, because I'm still researching it's fascinating mechanisms (for example, MCTs are a substrate for GOAT, aka ghrelin O-acyl transferase, to attach one medium chain fat to ghrelin, which binds to a receptor that results in increased growth hormone (hGH) production, and this activity is completely independent of the energy production activities of MCT oil). Personal example: Before I go to sleep each night, the last thing I do is as much mental activity as I can cram in before sleeppy tiredness overcomes my brain. This activity varies, but I might be doing a very tough mental math app, reading a kindle book as fast as I can, or practicing classical mnemonic techniques. If I take 1 or 2 teaspoons of MCT oil around bed time, my brain is much more awake and rapid thinking, so I can get more done. A word of warning though: MCT can affect people differently. Too much at one time can cause explosive number 2. I dare not have more than a tablespoon at one time.
Stimulants, e.g. caffeine. For the same reason as MCT above. Do more in less time.
Reduced stress: What I mean is to be not overly stressed on a chronic basis. Read/listen to the excellent book "Why Zebras Don't Get Ulcers". Chronic stress, like what many people have to deal with, reduces connections between brain cells. Too much chronic stress causes the dendrites to retract. This one is easy for me, because I just naturally have a non-stressed outlook, so my dendrites aren't retracting.