Setting the Dye in Yarn Once You've Knit the Sweater

I didn’t set the yarn in a sweater I just finished using cotton yarn because the skeins were already in balls when I got them. Does anyone have a fool-proof way to do this.
I know they are supposed to be colorfast, but they have bled in the past and I would rather not take a risk.
I know there’s a vinegar trick, but what is it? does it work with multiple colors?
Surprisingly, it is difficult to get an answer via Google. Thank you for any and all ideas!

Thank you!