It works well as an explanation, as people do seem to try and reduce complex functions to simple rules, and extrapolate from specific populatiosn to create general rules (not helped by studies that are minimally generalisable)
When a T-cell encounters a foreign pathogen, it extends a vitamin D receptor. A signaling device allowing it to bind to the active form of vitamin D. Only after this can T-cells perform their intended function. [1]
Which is likely why healthy levels > 40 ng/mL significantly reduce COVID mortality, there's been > 2 dozen obersvational studies and at least one randomized controlled one. [2]
1. von Essen MR, Kongsbak M, Schjerling P, Olgaard K, Odum N, Geisler C (April 2010). "Vitamin D controls T cell antigen receptor signaling and activation of human T cells". Nature Immunology. 11 (4): 344–49. https://doi.org/10.1038/ni.1851
2. Entrenas Castillo, M., Entrenas Costa, L. M., Vaquero Barrios, J. M., Alcalá Díaz, J. F., López Miranda, J., Bouillon, R., & Quesada Gomez, J. M. (2020). "Effect of calcifediol treatment and best available therapy versus best available therapy on intensive care unit admission and mortality among patients hospitalized for COVID-19: A pilot randomized clinical study". The Journal of steroid biochemistry and molecular biology, 203, 105751. https://doi.org/10.1016/j.jsbmb.2020.105751