Having enough vitamin D seems like it'd be correlated with getting enough outside-time in the sun, which also likely means the person moves their body, maybe eats real food, maybe gets some decent sleep, and maybe has stretches of good mental health, all of which at least seem to help people have higher resistance to infection.