Huge surveys long showed a correlation between smokers and increased incidence of cancer. But it took decades of research to rule out confounding factors. For example, it may have been the case that industrial work was causing the cancer and industrial workers just happened to be more likely to be smokers.
There is one tool that really nails causation fairly quickly which is a double blind controlled experiment. But usually in social science it's very hard to or even immoral to conduct such experiments.
For example, assigning babies at random to be smokers or not for some period would be pretty hard to carry out and certainly be immoral if you thought the smoking may lead to cancer.