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.
you had to eat a onion and a potatoe
President Harry Truman isssued the policy of containment
Containment, opposition to communism.
The Eisenhower and Truman Doctrines
The word for the countries who tried to block communism from spreading.