The study is called "Phosphodiesterase Type 5 Inhibitors in Men With
Erectile Dysfunction and the Risk of Alzheimer Disease" and published in "Neurology", for reference. It's open access, link: https://doi.org/10.1212/WNL.0000000000209131
The paper mentions neuroprotective effects, but it has been known for a while that nearly all types of PDE inhibitor can boost cognitive function, which has led to some interest in them as nootropics: https://pubmed.ncbi.nlm.nih.gov/25464010/
So, yeah, if I fancied myself at risk for dementia, I don't think it would be unwise to take viagra or sildenafil as a precautionary neuroprotective measure.
From the same paper, there's some indication that its cognitive effects might be more potent in women, as "[s]everal studies have suggested that sex hormones may influence the effects of sildenafil on the brain. Female mice performed significantly better than males after sildenafil treatment following HI insult, which suggests a sex-dependent effect of sildenafil (Engels et al., 2017). The underlying mechanism might be related to the relationship between sex hormones and the NO/cGMP pathway."