Every day we need to consume foods rich in vitamins and minerals (fish, flaxseeds, olive oil, nuts, seeds etc.) for the proper development of cognitive processes.
Besides eating, as you said, exercises that stimulate cognitive function are very important. If we do not accord importance for these things, in time, our memory loses information, so we have to read more for stimulating memory and concentration.