It’s sulfur dioxide which creates the most cooling effect. Probably what you were thinking?
Most volcanos spew out sulfur dioxide and particulates that result in global cooling.
Volcanoes don’t put out a lot of CO2.
https://www.usgs.gov/natural-hazards/volcano-hazards/volcanoes-can-affect-climate
The West coast fires of last Summer cast a milky haze all the way to the East coast which resulted in palpably cooler days. Extreme volcanism has historically triggered years without a Summer.
As much as I try to avoid hot weather, I'll take a warming climate over a cooling one any day. The latter kills.