Pope Leo XIV has announced he will undergo surgery to remove a localized lung nodule.