Other than what LEE suggested, your diet affects this a lot.
Excessive consumption of sugar disrupts memory, concentration and mental faculties in general. It can give brain fog. So restricting desserts to special occasions which are only a couple of times a year is important. Not eating sweets as well, and avoiding anything else that has sugars added to it.
Sweeteners like aspartame and acesulfame can also impair your cognitive abilities.
If you are a man, your testosterone levels are important for this. Try eating more red meat, garlic, onion, butter, and eggs. Eating a minimum of 5 eggs a day is a must for most men nowadays. Contrary to popular belief, egg consumption does not negatively affect cholesterol in your blood. In fact, it lowers it to healthy range when you have high cholesterol.
Here's a non-exhastive list of micronutrients that affect your brain:
- vitamin B6, B9 (folate), B12, C, D, E
- magnesium, zinc, iron, phosphorus
- choline, omega 3
Make sure you don't have any deficiency in those. The actually necessary consumption is 10x the recommended daily amount for minerals and water-soluble vitamins, and 4x for fat-soluble vitamins. The discrepancy is due to the fact the enemy wants you sick and underperforming.
When it comes to diet, it important to first get as much as you can from eating. All your daily requirements can be achieved just by eating. Supplements are only for deficiencies, and emergencies. There are exceptions however. For example, in Northern countries vitamin D supplementation is very important, as taking the Sun is not sufficient to produce enough vitamin D, even when paired with healthy amounts of food rich in vitamin D like mushrooms.
Physical activity is also of massive importance. If you don't train your body, your energy stagnates, so you don't get enough energy to your brain, which negatively affects memory and other cognitive abilities. Be sure to train your body 3-4 times a week. Walking doesn't count as physical acfivity unless you're morbidly obsese, as your heart rate doesn't get the necessary elevation it needs to circulate physical energy throughout the body.
Meditation and spiritual practice are not a substitute to taking proper care of your body. And before you snort and make up a million excuses why shouldn't train your body and how this is none of my business, keep in mind this is just advice. You're free to follow it and gain the benefits. You're also free to ignore it and bear the consequences of it, such as a mediocre life and no significant spiritual advancement. The choice and responsibility are yours.
Lastly, you need to actually train your memory by studying. Pick a topic to study, and memorise it. You need to this throughout your life for proper mental growth. Only, not just memorise it as memory is just one cognitive function. There's several more that need to be worked on for optimal growth. The most important of which is 'understanding' which is the real intelligence.
Best of luck!