The Marshall Plan dumped significant amounts of money into Europe and Japan. Countries like Japan and Germany had seen much of their infrastructure damaged or outright destroyed during the Second World War, and US and Allied planners were very aware that if these states were to recover in any reasonable timeline, they’d need significant economic stimulus. Yes, Europe and Japan had a lot more local expertise than Afghanistan did, but let’s also remember the Denazification efforts in Germany and similar policies in Japan, because a good many of the industrialists and other experts in both countries had played significant roles in their war efforts.
Afghanistan obviously was little better than a third world country when the Soviets marched in, but it was left a lot worse off afterwards. As to Iraq, well, we know what happened. The US committed enough troops to topple the regime, but it wasn’t until the Surge, when the damage to infrastructure and Iraqi society had already set the Insurgency on its course towards the menace it would become, did the Pentagon seem to realize toppling a regime is the easy part.
As to Iran, at least in the major urban areas, you have a well educated class that could certainly become the industrial and political leaders in a new regime, but if you smash infrastructure to pieces and then go “smell you later!” afterwards, I’m thinking the state that rises out of the ashes isn’t going to be a flowering democracy. That, and you’ll have 80 million Iranians, many of which weren’t all that fond of the US to begin with, that now absolutely despise it.
That’s before we even get into the geopolitical issues. I wouldn’t call Russia and Iran allies, but within certain limited areas, they do cooperate. I can’t imagine Russia would be at all pleased by the US toppling a government that is literally on their doorstep. China is no good friend of Iran either, but has significant economic interests in Central Asia, so it’s likely to become some form of ally should the US and Iran go to war, and both Russia and China, should the Islamic Republic fall, would be in there like dirty shirts, and again, I don’t think the Iranian state that came out of the ashes would be any kind of improvement from the US’s, Israel’s, or Saudi Arabia’s point of view.