Help!!

Hi I heard if you have or had an STD can cause infertility? Is that always the case even if you got cleared?