We do have lots of advice on how to minimise our risk of various kinds of cancers. A lot of it is drowned out by the siren voices of businesses who want to sell us things that are not good for us, but which we find so attractive that we buy them anyway. We're not a rational species, no matter what we tell ourselves, and we tend to ignore advice we don't want to hear.
The simple fact is we all have to die of something. In the past health care was far less effective than it is now and most people couldn't afford it anyway. Until the 19th century, we didn't have clean water piped into our homes, we didn't have efficient sewage systems, we didn't understand how infections are passed on, we didn't have anaesthetics or antiseptic conditons for operations and we didn't have X-rays. The only vaccination was for smallpox. We had no antibiotics. People died from infections all the time, especially children and babies.
In the 20th century life expectancy rocketed because of advances in all the above, plus the welfare state guaranteeing that people wouldn't die of starvation or malnutrition, plus the much maligned health and safety culture. We still shot ourselves in the foot, though, by taking up smoking in large numbers, leading to a huge increase in lung cancer and heart disease. Very slowly the message got through that smoking is bad for you so most people no longer do it and that's helped with reducing the smoking-related diseases.
Most people are now very old when they die, and they die of diseases that are more common in old age like Alzheimer's and cancer. It's debatable whether all those extra years of life are worth it if they're spent in poor health and confusion, but that's another debate.
Meanwhile many of us (I include myself here) are sabotaging our own health by ignoring all the health advice and eating a poor diet, or a decent diet but too much of it, and taking too little exercise, leading to unprecedented levels of obesity from childhood on. Too little fibre in the diet and too little variety in our food means the gut doesn't work as it should. Too many fat cells in the body and the hormone system is disrupted. Both those things are being looked at, as I understand it, to see if they're contributing to an increase in cancers in younger people.