Zardnaar
Deity
He did not, for all his faults, and there are. Considering where Yugoslavia was coming from, and the resources it had available, Tito's arrangements achieved surprising peace and prosperity. And the latent problems did not have to result in the civil war that broke it apart violently.
Hint: the more prosperous western countries were bigger, heavily supported by the major winner of WW2 and by far the wealthiest country in the world, and to the end still could scrape together more intellectual capital and imperial resources to rebuild with, of which Yugoslavia (and many other extremely damaged central european countries after WW2) had little. It was not a level playing field. The UK was scarcely damaged by the war on its territory, and had an empire to exploit for some time still. The french shamelessly exploited (and exploit) Africa for resources. The dutch suffered a severe setback after WW2, but had the good luck of natural gas at a critical time, and a central position to benefit from trade. Likewise in part with the belgians.
The italians and the germans are the only remarkable cases of rapid prosperity from ruin. It can be argued that they could still build on the know-how that remained, the tradition of industry and science was strong in Germany and northern Italy. But the US also helped a lot. Checking the other allies in Germany and then subsidizing it, lending also to Italy in order to block the red threat there that would grow if the country did not prosper under the western alliance.
Tito's Yugoslavia benefited also from its "neutral" position, it could more easily trade with east and west, even sometimes get support from both. And that showed. But there were limits, it never managed to become as prosperous as the larger western countries. Prosperous enough that they'd like to see it brown apart though, rather than deal with it as a near-peer inside an enlarging EU. Or a competitor locking that enlargement. The history of cross-border political meddling in the 20th century is interesting, you should study it! Everyone was doing it.
Whatever the government, Spain's chances of rapidly becoming prosperous were likewise limited, the Yugoslavia comparison is a good one. IMO a socialist "neutral" Spain would probably be more open that francoist Spain was, ans benefit from that. It had gone through a civil war and it was a country severely lacking in resources and know-how to catch up rapidly. A republican social-democratic Spain certainly would, and be drawn into the ECC before it was. Back when the EEC was actually advantageous to a country in its position.
Spain was in a fairly bad way after the war
They were to poor and weak to join WW2 on the Axis side.