"The principle of the "double effect" also applies to sexual sterilization. If a woman must have a hysterectomy to remove a dangerously cancerous uterus, this will result in her sterilization, but is not a sinful act. However, if the purpose of the operation is not to heal or safeguard health, but to directly sterilize, then that act is intrinsically evil and is always a mortal sin."
January 1, 1970
https://en.wikiquote.org/wiki/Principle_of_double_effect