So my question is, what happened to Italy between the Renaissance and the 20th century/ww1. The italian states and cities were prosperous and probably one of the if not the most advanced place on earth. Meanwhile in ww1 and especially in ww2 italy seems to be left out of the big industrialisation and we're not up to date with the rest of europe. So what went wrong for italy that other states as spain or later france and germany could surpass them?
You've pretty much hit the nail on the head when you referred to Italy being left out of the industrialization process. Almost all modern economic growth is linked to industrialization, and Italy was a late industrializer and an ineffective industrializer.
I wrote about Italy's slower industrial development in this thread from a few months ago which you might be interested in, although I might have been a bit to dour in my description of the Italian economy: on aggregate, Italy remained the third-most productive economy in Europe until around 1820, behind only England and the Low Countries. But the processes which led England and the Low Countries to first surpass Italy, and the ability of various other states in Europe to imitate (or substitute) of those same processes, would ultimately prove decisive in leaving Italy behind.