I would have to look it up but there were studies finding that a vitamin D deficiency correlated with a higher risk of developing severe cases of Covid-19.
If there is a causal relationship (i.e. better vitamin D levels will reduce the risk) or if this is because of a confounding factor is not known, as far as I know. A confounding factor could e.g. be a more healthy lifestyle in general. Running outdoors will expose people to more sunlight which leads to more vitamin D production - while couch potatoes with an unhealthy lifestyle would get less sunlight and lower vitamin D levels. In this case, supplementing vitamin D might have little to no effect - because all it would do is raising the vitamin D levels while the person still would have bad health because of their lifestyle.
Here's a link to the study [1]. It is a randomized trial so there's clear evidence that there is a causational link. Specifically, Vitamin D reduces the risk of needing ICU treatment.
As background, because healthy people tend to get out more there's always going to be a correlation between health and vitamin D levels. That means that most media articles gushing about a new vitamin D to health link are almost always worth ignoring. However, in the case of the Covid-19/vitamin D negative correlation it was much bigger than you'd expect by that route. Then someone actually did a randomized controlled trial and found a protective effect.
We can deal with this issue by running a randomized trial. Here's a link to a randomized trial [1] that establishes a clear causational relationship between Vitamin D and reduced admittance into the ICU.
I think in that case it was still a beneficial affect due to the marginal person in the study having a vitamin d deficiency and thus diminished immune response. Give them a proper dose of vitamin d and their immune system rebounds and pretty rapidly.
If there is a causal relationship (i.e. better vitamin D levels will reduce the risk) or if this is because of a confounding factor is not known, as far as I know. A confounding factor could e.g. be a more healthy lifestyle in general. Running outdoors will expose people to more sunlight which leads to more vitamin D production - while couch potatoes with an unhealthy lifestyle would get less sunlight and lower vitamin D levels. In this case, supplementing vitamin D might have little to no effect - because all it would do is raising the vitamin D levels while the person still would have bad health because of their lifestyle.
Here's a simple search for these keywords: https://www.bing.com/search?q=covid+19+severity+vitamin+d