The correct analysis of how the Papal States and the pope gained and lost power is:
As the Western Roman Empire fell apart, the Catholic Church gained power. Eventually, nation-states became more powerful than the Papal States and the pope.
This statement accurately reflects the historical context where, after the fall of the Western Roman Empire, the Catholic Church became a source of stability and authority during a time of political fragmentation. Over time, with the rise of centralized nation-states, the political power of the papacy and the Papal States diminished relative to these emerging sovereign entities.