The best source for vitamin D is the one that is available. That might be sunshine, or it might be a supplement.
Beta carotene or vitamin A may increase the risk of lung cancer in smokers. Finding a vitamin formulation without them is difficult.
Many people are low in vitamin D. We used to say that liberal use of sunscreen could block vitamin D formation. Research now contradicts that view.