Randomized clinical trials are a very good way of eliminating selection bias and ensuring that the association between treatment and the outcome is causal. It removes confounders that might have influenced the selection chance of participants in a clinical trial. The goal is create two comparable groups, the control and treatment groups.
Source: Suresh K. (2011). An overview of randomization techniques: An unbiased assessment of outcome in clinical research. Journal of human reproductive sciences, 4(1), 8–11. https://doi.org/10.4103/0974-1208.82352