Studying causal exposure effects on dementia is challenging when death is a competing event. Researchers often interpret death as a potential source of bias, though bias cannot be defined or assessed if the causal question is not explicitly specified. Here we discuss two possible notions of a causal effect on dementia risk: the "controlled direct effect" and the "total effect." We provide definitions, discuss the "censoring" assumptions needed for identification in either case and their link to familiar statistical methods. We illustrate concepts in a hypothetical randomized trial on smoking cessation in late-midlife, and emulate such trial using observational data from the Rotterdam Study, the Netherlands, 1990-2015. We estimated a total effect of smoking cessation (compared to continued smoking) on 20-year dementia risk of 2.1(95%CI: -0.1, 4.2) percentage points and a controlled direct effect of smoking cessation on 20-year dementia risk had death been prevented of -2.75(-6.1, 0.8) percentage points. Our study highlights how analyses corresponding to different causal questions can have different results, here with point estimates on opposite sides of the null. Having a clear causal question in view of the competing event and transparent and explicit assumptions are essential to interpreting results and potential bias.