It caused the Cuban 'special economic period' too.
The USSR went bankrupt for all sorts of reasons. Expenses on the war on Afghanistan. Crumbling infrastructure including oil extraction and transportation. Supposedly their oil industry production collapsed just before the crisis happened. Besides the infrastructure they ran out of the easily accessible oil that used to fuel their planned economy. As a result the whole thing came tumbling down. The system was designed to run on cheap oil.
They did not have unfettered access to the worldwide markets either not a lot of goods they could sell to other countries besides weapons. That certainly did not help either.
So the move to thawing relations with the West had to happen regardless of it breaking up or not.