Direct exposure to sunlight is the primary way to obtain vitamin D.
During the summer months, it’s easier to get our recommended twenty minutes of sun exposure daily to the face and lower arms and hands but because in order to get the vitamin D that exposure needs to be without sunscreen, it is advisable to limit sun exposure to the mid-morning or mid-afternoon, outside of peak UV times, to protect yourself from skin cancer.
Note also that someone with darker skin will require more time in the sun to produce the same amount of vitamin D. In the winter months, you would need to spend considerably more time in the sun to achieve the same level of vitamin D.
The easiest and most reliable way to increase vitamin D levels for anyone who has low levels and cannot increase their sun exposure is through a supplement.
Typically, you will find supplements ranging from 12.5 mcg (500 IU) to 125 mcg (5000 IU). My recommendation is that you take at least 500IU and a maximum of 3000IU per day.