Pope Francis revealed in a new interview published on Sunday that after he was elected in 2013 he signed a letter of resignation to be used if someday severe and permanent health problems made it impossible to carry out his duties.
https://nypost.com/2022/12/18/pope-francis-signed-resignation-letter-in-2013-in-case-of-health/