A good deal of evidence points to declining kidney function as a cause of declining cognitive function in aging. There are strong correlations between loss of kidney function and risk of dementia, for example. Correlation isn’t a smoking gun in matters of aging, however: it is possible for any one of the underlying forms of molecular damage that cause aging, or for intermediate consequences of that damage, to give rise to otherwise unrelated pathologies in different parts of the body. Those pathologies appear more often in people with greater amounts of that form of damage, and thus appear correlated.
Nonetheless, there are good reasons to think that kidney failure and its downstream consequences contribute meaningful to neurodegeneration, perhaps largely by degrading the function of the vascular system. Vascular aging can cause damage and dysfunction in brain tissue via numerous mechanisms, including the pressure damage of hypertension, similar damage resulting from an acceleration of atherosclerosis, failing to delivery sufficient nutrients and oxygen to the energy-hungry brain, and disruption of the blood-brain barrier, allowing inflammatory cells and molecules into the brain.