The level of evidence isn't great yet, but its highly likely that Vitamin D can help modulate the immune system. There is a retrospective study showing a difference between patients that got Vitamin D and those that didn't (can't find the link, unfortunately), and
there is a small Spanish trial of 75 people where 50 got Vitamin D and 25 did not; in the group that did, 1 person needed oxygen whereas in the other group 12 people needed oxygen and one died - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7456194/
there is a small Spanish trial of 75 people where 50 got Vitamin D and 25 did not; in the group that did, 1 person needed oxygen whereas in the other group 12 people needed oxygen and one died - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7456194/