Opioids would stop sub withdrawal right?

I’ve always assumed that would be the case but wasn’t sure if I was missing something

I remember going through a week of subs withdrawal and it was the worst week of my life. I was just never sure if I could’ve stopped it with an opioid.