I heard the same thing and my brain immediately screamed correlation is not causation.
“It’s unclear exactly how the shingles vaccine might influence dementia risk. It may reduce inflammation, support the immune system in ways that protect the brain or involve other mechanisms. It’s important to note that this study looked at the Zostavax vaccine rather than Shingrix, which is now more commonly used.
The studied vaccine is not Shingrix and without a mechanism of action, there's little reason to believe Shingrix would have the same effect.
IMHO, those already suffering from early stages of dementia are less likely to get shingles vaccines because they already have impaired decision making skills. They can't weigh the known short-term side effects against unknown long-term negative outcomes.