1) Vitamin D levles is strongly correlated with physical activity levels, so a mere observational study can be strongly confounded - which may be part of why this study finds disagrees with some the merely correlational studies in the past.
2) This study is a Mendelian Randomization study, where since you haven't randomized individuals' Vitamin D levels, you instead assume that their genetics are random (you either get a variant from your parent or not, by chance) and that genetics may cause Vitamin D levels. So if those genetic variants are correlated with COVID outcomes, then we say it's because of Vitamin D. Notice the problem? You need to assume that the genetics do not affect anything else except via Vitamin D. Now I think that's where this is very tricky: they're identified variants that predispose someone to high/low Vitamin D via a genome-wide study, i.e. just check everything for correlation with Vitamin D. The obvious problem is that correlation isn't causation so some or most or all of those variants will influence other factors too, and it becomes harder to say that Vitamin D is the reason COVID was severe or not. Ideally you have instead hand-picked variants with obvious known mechanisms as to how they affect Vitamin D metabolism, say. In lieu of that, you have to do various tests that try to spot how problematic this problem is. (Look for "pleiotropy" in the paper. Back-causation is the other problem you need to consider generally, but it's not really a concern here.)
Personally I don't trust those tests further than I can throw them as they make some questionable assumptions. The main method this paper uses is MR-Egger, which (IIRC) assumes that the non-Vitamin D ways the variants affect the outcome are inconsistent across different variants. Like, this variant might act on Vitamin D and immune system but this other one acts on Vitamin D and your cardiac system so we don't expect the non-Vitamin D portion to be consistent. That seems highly questionable, even I would expect the typical state to not be that, where variants that affect Vitamin D are likely in pathways that also affect specific, consistent other attributes. The authors are aware of these difficulties. I can't assess whether they've succeeded in addressing them or not, but I believe the problem is extremely difficult and they have an up-hill battle.