It isn't a 1:1 causal link--virtually nothing is. But there's very strong evidence that unprocessed trauma is one of the core drivers of addiction.
It's constructive to think of drugs and addictive behaviors as emotional crutches. You don't help people with problems walking by making crutches illegal; you do so by focusing on treating the root cause, which may include taking the crutch away in a properly supportive therapeutic environment.
I'd also point you to the experiments dubbed "Rat Park" (https://www.psychiatrictimes.com/view/what-does-rat-park-tea...). Addiction is ultimately a social/emotional disease; the drug/habit is the symptom.