What was your cause of second trimester miscarriages/ stillbirths

Ka
I lost my son at 21 weeks froma bacterial infection that caused my membranes to rupture. For those of you that have had second or third trimester loss's what was the cause?