Most people are way too pesimistic about the USSR.
Take the economy for example:
The USSR had a higher economic growth than the USA during allmost all of its existance. See, a planned economy has a higher potential of both quantity and quality of production.
A market economy is lead by the profit motive. So CEOs will only produxe stuff that is profitable, instead of focusing on stuff people need. A good example would be the food situation in the OTL third world: The production capacity would be enough to feed much more people (if not everyone) by now. Yet those people have no (or not much) money. So its much more profitable to ship the stuff to europe or the US where it is wasted intead of feeding the people.
Also in a market economy there is no share of information (why tell important stuff to competitors?), so a lot of labour is wasted or directed wrongly.
Furthermore the economy cant be directed without state interference. So if it would be long term good to invest, say in industry, the government cant do it, and the country must wait untill capitalist progression leads to industrialisation. Thats why US industrialisation took over 100 years, while USSR ones took only 21 years.
Last but not least, recession crissis is a thing inherent in capitalism.
Long story short: The problem with capitalism is, that it produces for profit, not for the people.
So to the original topic:
There are multiple ways the ussr could have won the cold war:
1. Avoid Gorbatchevs horrible economic reforms, the pollitical destruction of the eastern bloc (By letting the west infiltrate the governments od the various states. The best example would be east germany, where the opposition only wanted a reformed communism, but some people in the party overthrew the Honecker government an signed the reunificatin treaty. The book 'Triumph of the evil goes by making Grigory Romanov win the power struggle. Than make the USSR crack down on opposition movements around the eastern bloc. Then end the econimic stagnation (I dont deny the stagnation,but STILL, USSR had a higher growth than the US). Investing in computerisation (something brezhnev missed out) would help greatly.
Then just let the coldwar continue as it went, and with the same growth trends, the USSRs economy overtakes the American one by the 2010s.Then make the USSR fund anti-neocolonialist and communist movements all over the third world. And the US economy (dependent on neo-colonial exploitation) will collapse. The US isnt likely to go communist instantly, but it will go for some kind of neo-isolationism ,withdrawing troops and economic investment from foreign countries and leaving nato, as well as stop the funding of its other allies. The USSR funds communist movements in western europe.
Due to the USAs new course, the economies of western europe (also dependent on neo-colonial exploitation, and also american investment), western european economies crash aswell so communist parties gain a lot of support.
Untill the 2020s the western european states have gone communist, and the USSR has won the cold war. Other nations around the world will follow, until the USA itself will goes communist, seeing the progress this socio-economic system has archieved. Maybe states like Texas, Alaska, California and Hawai become independent communist nations.
Now its only a matter of time untill all the world goes red, and full, and automised communism will be reached.
2. You can get all of that a lot faster, if the USSR invested more in automatisation before. In the 60s this idea was, indeed, proposed, but stopped by some elements of the party. If this system, called OGAS, was implemented, the USSRs economy would experience a phantastic boom, as the now free workforce could be used in other parts of the economy, while at the same time, people would have to work less. The USSR would overtake the west economicly, by the 1980s, thought the workload of its people was much lesser, than in the west and people in the west wouldnt even toil for themselves, but for private capitalists. Communism will skyrocket in popularity all around the world, and western europe becomes communist in the late 80s. The USA suffers from internal strife, due to the failing economy and maybe also racial tensions. The rest of the story will be quite the same as in my first scenario.
What I also wanted to say: No doubt, that most of the eastern bloc had an economic crissis in the 1980s. But that was not because of communism. For example Poland, Romania and Hungary
had massive debts, because they took big loans during the 60s and 70s. But they didnt invest this money into the growth of the economy, but into the import of consumer goods. In the 80s they had to pay this money back, which dealt a bad blow to their economies.
Another famous myth is the 'inefficiency' of soviet agriculture. On this topic, I will just point out the great criticism of this topic by american economist Joseph E. Medley (from the university of southern Maine), and the two books 'Farm to Factory', by Robert C. Allen, and 'Triuph of the evil', by Austin Murphy.
Also I want to point out, that the USSR and the USA had a completely different historical backround. The US had their industrial revolution in the 1800s, while the USSR had their industrial revolution in the 1930s. They Russian Emoire was a poor and agrarian country with a live expectancy of 35 in 1913, while the USA at the same time was a quite developed and industrial country with a live expectancy of 52. The average american earned 17 times that of the average russian. So from the start on, it was not even. And then, during WW2 a lot of european (mostly eastern european) industry and infrastructure was destroyed, and the USSR lost 27 million people, of a total population of 180 million people.
The US mainland was completely untouched by the war. The US spend tens of Billions of dolars to re-build western europe (Through the Marshall plan and investment), while the USSR had to re-build itself and couldnt help their allies re-building. Economy is build on the base, so this loss of economic power during the war dealt an unimaginable amount of damage in the long term (Without the losses of labourpower and output of the war, some economists say, that the USSR would have overtaken the US by 1990).
With that sayd, yes the USSR could have won the cold war. Its a miracle that the USA won the cold war OTL, and the USSR collapsed (actually it wasnt really a collapde. Yelzin and a bunch of other politicians met in 1991 in Alma Ata and signwd the 'Union Dissolution' treaty.
https://en.m.wikipedia.org/wiki/List_of_countries_by_largest_historical_GDP
https://en.m.wikipedia.org/wiki/Economy_of_the_Soviet_Union
https://www.amazon.com/Triumph-Evil-Austin-Murphy/dp/8883980026
https://www.amazon.com/Farm-Factory-Reinterpretation-Industrial-Revolution/dp/0691144311