There are several things that I believe have increased my cognitive abilities. If I had to choose one, it would be 1.
1. Keeping learning and applying new things. New skills like new programming languages, new math, new strategy games, new situations in life in general.
2. Teaching. Whether a peer or a junior or anyone. I taught people since very early in life (say 6th standard). I believe this to be a knowledge multiplier.
3. Programming is a superpower that enables you to think in newer ways, solve problems in newer ways. Learned Prolog, Scheme, Haskell, Ruby, C++, Julia, APL- even if I don’t use them in my work/projects. I kept learning newer things- genetic algorithms, ML, non-linear dynamics, game programming, and coded newer things. This is great.
4. Meditation. It made me calmer, helped me make better decisions. More focused in learning, find patterns quicker and more intently. It's an anti-dote to scrollvirus infested world.
5. Exercise. Doing less is fine as long as I do it regularly.
6. Sleep. Always slept 7-9 hours since childhood.
7. I believe even small exposures to newer areas of knowledge increases your intelligence. It doesn't remotely make you an expert in those areas, but it makes you better in your field/s.
8. Art is really important and significant in my life. Performing arts and consuming them- are both great and enable different things in your life. Reading novels had made me more empathetic and exposed me to different worldviews. It has been valuable. When giving a presentation/convincing someone of a view- all the instincts I learned from performing arts kicks in. Some would call me crazy but while writing theorems, this happens, too. Also art is a great escape, using which you can turn off from the real world and heal from pains/unpleasant situations which enables you learn new things. Learning to play a piece on piano/guitar is like solving a programming problem (yourself, not memorize it). Your brain is in fire.
9. Solving problems regularly makes your brain better in the short term. Like solving Codeforces problem or automating a significant something in Factorio. Just like if you want to look in better shape for few hours, 20 push ups achieve this for you; solving 2 codeforces problems each day for 6 days will enable you to be in sharper state for the next two days.
10. Believing yourself as a force of good in the world helps you stay motivated in trying times.
11. Having a close friend/SO helps a lot.
The sooner you realize that cognitive skills are tied to your mental and physical wellbeing, the better.