It might be worth seeking advice from your doctor. A doctor can prescribe vitamins in certain situations. Even if the doctor cannot prescribe vitamin D for you in your particular circumstances, you might like to consider asking your doctor about it, maybe in a telephone appointment in these troubled times, if you have access to a telephone, then if the doctor agrees, then at least you would know that you were taking them with the knowledge and agreement of your doctor and it would most likely be on your medical record too.
For example, the doctor might advise on how much to take and might even suggest other vitamins and minerals.
I hope this helps.