Get sun. If you can't get sun you should eat a variety of food that contains vitamin D. If you can't do that, you should take a supplement. Take the supplement at the same time as you eat a meal, preferably a meal that has some fat.
Here's the advice for England:
https://www.nhs.uk/live-well/healthy-body/how-to-get-vitamin...
https://www.nhs.uk/conditions/vitamins-and-minerals/vitamin-...
I personally don't give a shit if you are a foreigner. If the NHS website can provide good advice and help someone - anyone, then my tax squids are being put to good use.
There are bound to be other good sources of health related advice around the place but why not start with the NHS and work out from there?
Then, if some sort of expert consensus comes up, the authorities adopt that. When that consensus is challenged by new evidence, authorities are slow to change, because that would be implicit admission that they were giving the wrong advice, which is not something that the human egos involved there can easily stomach.
A good example for this is the food pyramid[1]. It was never supported by good evidence, it was adopted through expert consensus (one might also call it lobbying), and it was later removed from the guidelines. You can still see posters of it hanging in doctor's offices, of course.
[1] https://en.wikipedia.org/wiki/History_of_USDA_nutrition_guid...
You're never going to get sensible dietary advice, period. Diet is a belief system. Most people, including doctors and health authorities, really just go by clichés, like "eat five a day" or an unspecific "balanced diet". The science on it is poor and forever will be.
> If you can't get sun you should eat a variety of food that contains vitamin D.
Half an hour in the sun, if you are light-skinned, can get your body to produce about 10,000IU of vitamin D. To get that amount in the diet, you would need to eat more than a pound of the right fish.
Diet can get you out of the "severely deficient" range, but almost certainly not into the healthy range.
> Here's the advice for England
They actually advise supplementation, but they err on the low end. The only way to know if you get enough vitamin D is to do blood tests, people react quite different to different doses and forms. One guy here reports 10,000IUs daily gets him to only 55ng/dl (high end of normal), whereas 5000IUs gets others above 70 ng/dl (possibly harmful). Vitamin D builds up over time, so one test is not enough.
> If you can't get sun you should eat a variety of food that contains vitamin D.
It's admirable that you prove your own point two sentences later.