For a long time, the scholarly consensus was that you are born with a fixed number of neurons and then start losing them over your lifetime. Now there is good evidence of adult neurogenesis and it seems to be linked to endurance exercise, such as walking. These links can be a starting point for reading up on it:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4425252/ https://www.npr.org/2011/02/04/133498136/growing-a-bigger-br...