Pope Leo XIV said doctors had detected a very early-stage nodule in his lung, and that he would undergo surgery in the coming days.