According to de Lucia and colleagues (2020), yes they do.
People with certain variants of genes that play a key role in brain ageing seem to respond better to a healthy lifestyle.
Some versions of the SIRT1 gene are affected by amount of exercise and some variants of the GRB10 gene by whether people eat a Mediterranean
de Lucia, C., Murphy, T., Steves, C.J., Dobson, R.J.B., Proitsi, P. & Thuret, S. (2020) Lifestyle mediates the role of nutrient-sensing pathways in cognitive aging: cellular and epidemiological evidence. Communications Biology. https://www.nature.com/articles/s42003-020-0844-1.