Being married reduces dementia risk. e.g. [0]
Being primary caregiver to a spouse who has dementia does substantially increase the caregiver's risk of cognitive decline due to caregiver burnout. [1]
I'm not sure if this is what you were trying to express.
[0] https://jnnp.bmj.com/content/89/3/231
[1] https://www.ovid.com/jnls/neurotodayonline/fulltext/10.1097/...
Dude I got my banjo too...
18 year study found unmarried more likely to not have dementia:
https://alz-journals.onlinelibrary.wiley.com/doi/10.1002/alz...