The leading causes of death in the UK[1] are heart disease, lung cancer, influenza, dementia, vascular disease (stroke?) and lower respiratory disease. Skin cancer is 1% of cancer deaths, and for melanoma the peak of diagnosis is people 85-89 years old[2]. Considering average life expectancy, people are generally diagnosed with skin cancer a few years after they die.
The partial claim "refrain from going outside which in turn .. is way worse than potential UV induced cancer risks" could be right. Avoiding exercise and increasing your heart disease risk, in the hope that you'll avoid one of the more treatable and less fatal cancers in very late life, is probably the wrong tradeoff. Not to do with Vitamin D or covering up or suncream though. Still, why not do both - cover up and go out, lower heart disease risk and lower your chances of skin cancer diagnosis in late life.
[0] https://www.bhf.org.uk/informationsupport/heart-matters-maga...
[1] https://www.ons.gov.uk/peoplepopulationandcommunity/healthan...
[2] https://cks.nice.org.uk/topics/melanoma/background-informati...
Melanoma causes 1.5 % of total cancers related deaths according to CDC so you are much more likely to die from all the other types of cancer. https://gis.cdc.gov/Cancer/USCS/#/Trends/