I've heard that many times over the years and I have taken a Vitamin D supplement on and off (more off than on) over the years.
When this COVID-19 thing first hit, I had a physical scheduled (by chance) just about the same time, and I'd heard about this Vitamin D / COVID-19 connection, so when I went in for my physical, I asked my doctor to order a Vitamin D test as part of my bloodwork.
As it turns out, I was indeed very deficient in Vitamin D. I started taking 4000 IU a day and it's had a noticeable impact on my overall sense of wellbeing. It could, of course, be placebo effect even so. And I have no particular reason to think that it will make any difference one way or the other in terms of me getting COVID-19. But I thought it was worth pointing out one more anecdote that suggests that the old "Vitamin D is worth supplementing" refrain might just be true.
If you're in doubt, and it's an option, do what I did... just ask your doctor to run a Vitamin D test next time you go in for a checkup / physical.