The Washington Post says that counties with the highest level of legal opioid use from 2006-2013 (i.e., oxycontin) now have the highest level of fentanyl overdoses:
According to the Post, "The data confirms what’s long been known about the arc of the nation’s addiction crisis: Users first got hooked by pain pills saturating the nation, then turned to cheaper and more readily available street drugs."
I get exasperated at the mindless repetition of "correlation is not causation" from people with no real reason to say it, but in this case I really do doubt the causation that runs from oxy to fentanyl. All this chart shows is that counties with low drug use in 2006 also had low drug use in 2019. Conversely, counties with high drug use in 2006 also had high drug use in 2019. It was just a different drug. But one of the best known findings in illicit drug research is that drug use is faddish. Over the past few decades we've seen waves of crack, followed by marijuana, followed by meth, followed by oxy, and finally followed by fentanyl and heroin.
It's possible that oxy led to fentanyl, but there are also good reasons for the fentanyl crisis to have started around 2014 that are based on chemistry and supply chains and have nothing to do with the oxy crackdown.
I'm not sure what data you'd need to figure out causation here. In the meantime, I'd be a little cautious about accepting the just-so story that says oxy users all switched to fentanyl because they could no longer get their pills.