This is a good study on the starting point of 538 AD for the 1260-year prophecy, and easy to grasp:

"But with the rise of Napoleon, and the exile into captivity of the pope by French general Berthier, there was a rare moment of near prophetic unanimity among Protestant expositors, who declared that this period ended in A.D. 1798. It was a matter, then, of running the period backward to find the starting point, which would be A.D. 538....A careful study of Daniel 7:24-26 and some related prophetic passages reveals that the decisive events of the terminal moments of the 1,260 years should be understood primarily legally, rather than militarily. Once this legal framework is understood and given its due weight it becomes clearer how the 538 event relates to the 1798 event. In a nutshell, the Justinian Code, which was completed in 534, ?enacted orthodox Christianity into law,? placed the pope as the formal head of Christendom, ?ordered all Christian groups to submit to [his] authority,? and gave him civil power of life and death over heretics.

This code, however, did not become legally promulgated and enacted on the ground until the siege of Rome was lifted in 538. Justinian?s general, Belisarius, had entered Rome unopposed at the end of 536, but shortly thereafter the Ostrogoths came and laid siege to Rome. After about a year the siege was broken, and Belisarius had control of Rome and its environs.5 It was then that the provisions of the code elevating the Papacy could actually be implemented by Belisarius beyond the borders of Rome itself. The Gothic Wars continued, with the Ostrogoths being finally driven out in 553.

But these later battles and sieges did not nullify the papal-centered legal system that had been put into place in 538. Even when Rome fell again to the Goths, they did not control the Papacy, as at that time it was operating outside Rome. ?After 538,? Adventist scholar Jean Zukowski observed, ?the papacy never came back under the control of the Ostrogothic kings.?7 The papal system, placed at the head of Christendom and given the power of life and death over heretics by the Justinian Code, endured in the West for more than 1,000 years, being given a great boost in the legal revolutions of the eleventh and twelfth centuries, forming the legal scaffolding of many modern states.8 That is, until the secular revolutions of the eighteenth and nineteenth centuries, where the code and its religious character were explicitly rejected.

These secular revolutions began with the French Revolution, which soon led to the capture and exile of the pope by Berthier in 1798. But again, more significant than the military/political event of the capture and exile was the replacement of the religious-centric Justinian Code by the secular Napoleonic Code. The secular code was implemented by the famous bill number 8 of February 15, 1798, where General Berthier declared Rome an independent republic and ?in consequence, every other temporal authority emanating from the old government of the Pope, is suppressed, and it shall no more exercise any function.?" https://www.adventistworld.org/understanding-the-1260-year-prophecy/