Yes, there are complications associated with some sexually transmitted diseases that can lead to sterility.
Typically, bacterial infections (chlamydia, gonorrhea, and others) can ascend from the vagina to the uterus (causing endometritis) or to the fallopian tubes (salpingitis).
Likewise, they can continue to affect the ovary, producing oophoritis and even generating adnexal abscesses.
Endometritis is an infection of the endometrium, where the embryo must be implanted. Logically, this infection will prevent the implantation or correct embryo development. Although it can be treated with antibiotics, on many occasions the infection becomes chronic and asymptomatic.
This means that an apparently normal woman, who has had a previous infection, which seems cured, may have endometritis that causes an implantation failure. However, although the diagnosis of this condition is complicated, its treatment is relatively simple.
In addition, endometritis that is very intense or prolonged over time can physically damage the endometrium. The appearance of scar tissue in the endometrium prevents implantation and can be very difficult to treat. It is called Asherman's Syndrome, a serious situation that must be evaluated by a specialized team.
The fallopian tubes are very fine structures that take care of the collection of the oocyte, the transport of the sperm to the oocyte and the active transport of the embryo to the uterus. For this they require the functionality of their small cilia, a kind of hairs that within the tube sweep the embryo (which has no possibility of movement) from the beginning of the tube to the uterus.
Suggested for you: Can STDs Affect Getting Pregnant?.