Your body will produce vitamin D if your skin is exposed to enough sunlight. However, exposing yourself to too much sunlight may increase the risk of cancer. Because vitamin D is low is most food, supplements are often the answer.
Vitamin D3 can be vegan, for example, if it is derived from lichen. However, usually vitamin D3 is derived from sheep and therefore is not vegan.
Vitamin D2 is always vegan.
There are many people who claim that vitamin D3 is better than vitamin D2.
The study below shows that vitamin D3 is only more effective than vitamin D2 when users take megadoses of more than 50,000 IU at a time. The Vitamin D Council recommends that healthy adults take 2,000 IU of vitamin D daily. At this level, there is no difference in the effectiveness of vitamin D2 and vitamin D3.