Thank you for commenting and asking that good question. Honestly, it's difficult to say for sure at this point. At least for the shingles/herpes zoster vaccine, there's strong evidence that it lowers the risk of dementia because it comes from a longitudinal study that managed to capitalize on a unique natural randomized setting of vaccinated vs. unvaccinated individuals.
While there's also evidence that the flu vaccines (at least 4 annual doses*) lower the risk of dementia, this evidence isn't as strong due to its observational nature. Observational studies have no randomization and are prone to numerous confounding variables that obscure cause-and-effect determination.
*According to a meta-analysis I mentioned in the article: "Individuals who received 1 or 2-3 influenza vaccines during the follow-up period had no reduced risk of dementia compared to unvaccinated individuals, whereas people who received at least 4 annual influenza vaccinations had a 49% reduced risk of dementia."
Regarding covid vaccines, correct me if I'm wrong, but I'm not aware of any studies that found they reduce the risk of ND. So, I'm not sure what to say in this regard. I hope future studies can tackle this question of whether vaccines are a viable and effective way to curb ND incidence.