Cancer mortality: Vitamin D does not appear to prevent cancer, but may reduce death rates from cancer overall (when all cancers are combined) when Vitamin D is taken for several years. It is not known whether Vitamin D itself fights cancer. It could also be that individuals with cancer are more prone to developing severe Vitamin D deficiency, which leads to bone loss, fragility, and fractures, which increase mortality.
from https://www.devaboone.com/post/vitamin-d-part-3-the-evidence?postId=5f4e8bf673d853002ded6cd3