Rome was a consistent cultural reference for European thinkers and state-crafters. While the "collapse" of the Western Empire is debated (u/Lollardfish wrote a good book about this) "Rome" was part of what might be called "sacred geography" - a number of polities and individuals used connections or descent or affinity to the Republic, the Empire, or institutions within one or both to create legitimacy.
The Byzantines, for examples never called themselves Byzantines. They called themselves Romans, and their country 'Romania' (yes, that's where the name of the current country comes from) and assumed decent from the Christian Roman Empire of Constantine and Theodosius. When the Turks took over, the Sultan (and Caliph, and guardian if the Holy Cities of Mecca and Medina) called himself "Kaisar-i-Rum" - as in "Caesar of Rome.
The broader Orthodox world claimed "Rome" had transitioned - from Rome to Constantinople, and then to Moscow - "Tsar" comes from "Caesar" and "Third Rome" thinking was and is part of Russia's whole "reunite Ukraine and Russia and Belarus" thinking.
Further west, Charlemagne built up an identity as defender of the Pope (the Bishop of Rome) to set the Carolingian Empire as a successor to Rome. He even tried to marry a Byzantine Empress to "reunite" the Roman Empire. When they didn't work out and he split the Empire between his sons, the "succession" from Rome passed through to the French and the Germans, who consistently tried to match their claim to Roman history by negotiating or conquering or otherwise controlling the Pope in Rome - the "Holy Roman Empire" was ruled by Germans and Flemings and Bohemians and such all the way down to 1800, when Napoleon ended the official succession.ñ and took some of the symbolism for himself (the Iron Crown of Lombardy as King of Italy, eagles on his battle flags, etc.)
At the same time, Italians were organizing city-states (Florence as the most famous example) and appealing back to "republican" virtue. Machiavelli 's Prince and Discourses on Livy are both oriented toward building an Italy that was united, free, and powerful - like the Roman Republic before Marius. Machiavelli and contemporary writers were major influences on John Adams and through him younger American stste-builders like Madison, Jefferson, etc.
The last imperial monarchies who ever claimed any affinity or heritage from from Rome - the "Third Rome" Russians, the "Kaiser-i-Rum" Ottomans, and the "Holy Roman" Germans and Austrians - finally collapsed in World War I.