In 1958, six founding countries, Belgium, Germany, France, Italy, Luxembourg and the Netherlands, came together to form the European Economic Community.
Spain didn't join the United Nations until 1955 and didn't join the European Economic Community, the precursor of the European Union until 1986 decades after it was initially formed.
It would ultimately take over twenty years for Britain to realise it was falling hopelessly behind its neighbours in Western Europe economically before Britain joined what was by then the European Economic Community.