It is possible you were not taking enough to achieve a high enough serum blood level to offer protection.
..............................................
The report of the study (see the post) points out that taking vitamin D is therapeutic regardless of the serum level of the vitamin.
Yes it is therapeutic if you have contracted Covid.
It must be at a higher blood serum level to prevent respiratory illnesses.