This question has actually been pretty thoroughly researched, so it should be possible to come up with a conclusive answer. A systematic review and meta-analysis of the collected data was published in the British Journal of Medicine in 2017. The review was funded by the National Institutes of Health (NIH). No companies standing to benefit from the sale of vitamin D supplements were involved in funding the study and none of the authors had financial ties to any such companies. That makes me quite prone to trust the data.