Building ICBMs requires not just money, but wealth. Infrastructure, the ability to divert your smartest people to building ICBMs because they aren't needed to solve "the food problem", ability to create a system where smart people can become educated, etc.
Communism is a system in which the government basically has all the money, but it isn't very good at producing wealth. Wealth is produced by the aggregation of countless little local decisions and communism is absolutely terrible at making those local decisions. So even though the government basically has all the money, it was in a system that didn't have a lot of wealth.
The USSR had plenty of scientists and natural resources, but they were embedded in a system that couldn't produce enough wealth to compete. The US ultimately, for all the sound and fury surrounding the military expenditures of the 1980s, was building its military out of the leftovers of its budget. A much less wealthy system couldn't even keep up with a fraction of the wealth the US had, regardless of how much money it may have controlled.
You're so far off I despair of even imagining where to begin trying to correct you. You have to have a base level of wealth to even come close to building them.