Hello! As Roman Imperial authority collapsed, the vacuum it left was more often than not filled by those in the best place to do so: local and regional leaders who in many cases were already de facto if not necessarily de jure authority figures. Indeed, in some cases the 'fall of Rome' could be equally described as the re-establishment of provincial independence. I wrote an answer recently here that looked at the establishment of the Kingdom of Francia in the former Roman province of Belgica Secunda and its expansion into (roughly) what is now France. The tl;dr of that is that the founders of that early Frankish kingdom were all very closely linked to the Imperial power structure, whether as generals, governors or administrators. The collapse of Imperial authority simply gave them the impetus to turn that pre-existing position into one with political autonomy.
Although things eventually went sideways, a similar situation also occurred in Britannia: according to Gildas, the regional Romano-British governments were eventually able to establish a relatively peaceful and prosperous series of polities despite the withdrawal of the Roman legions and the vast military and logistical problems this caused. It is eventually a particularly virulent outbreak of plague that precipitates the decline of these successor states and the arrival of the English rather than necessarily the lack of Imperial oversight.
Key to the functioning of these post-Roman successor states is in many cases the Church, which rapidly fills the bureaucratic void left by the decline of Imperial administration. Augustine of Hippo's The City of God, written in the wake of Alaric's sack of Rome in 410, provides the theological blueprint that underpins much of the function of the medieval Church and its close relationship with government. In essence, Augustine argues that the Church should act as a spiritual successor to the Empire, but one that concerns itself purely with spiritual matters rather than those of earthly politics. Perhaps slightly ironically, this philosophical detachment makes the Church perfect for underpinning medieval government, providing as it does a sophisticated and codified, easily replicated and - perhaps most importantly - literate hierarchy across society that can function as a pre-made civil service without actually involving itself in squabbles for power. At least on paper. Of course, the Church almost inevitably and immediately gets drawn into politics across post-Roman Europe, but the intentions at least are good, and successor state rulers often actively courted clerical support. Clovis I of Frankia, for example, actively courted the Church in Gaul even before his conversion to Christianity, seeing the importance of the Church to the kingdom he was building.