Did containment during the Cold War work?
Did Communism spread much? Nope.
Did the Soviet Union collapse? Yep.
Well, we fought two hot wars under containment: Korea and Vietnam. Containment obviously didn't work in SE Asai where South Vietnam vanished, Cambodia and Laos both went communist.
It's hard to give a clear answer on whether it worked or not. The USSR didn't collapse due to containment. Communist just does not work as an economic model and so it collapsed. It likely would have collapsed a lot sooner if they had not received a boost in innovation taken from Nazi Germany in 1945.