Late miscarriage

I went through <a href="https://glowing.com/glow-fertility-program">IVF</a> and we got pregnant. On June 20 I had a late miscarriage no symptoms at all. No bleeding, no cramping, no back pain.. I just felt a pressure in the pelvic/vagina area. Came home from work and I went to pee and felt more pressure and I standing up and my water broke all the fluid came out. My husband and I went to the hospital stay overnight . They did ultrasound and my baby had a little bit of amniotic fluid his heart was still beating. The next morning they did a second ultrasound and my baby heart beat slow down to 130 with hardly any amniotic fluid. So doctors induced the labor at 17weeks and 2 days. He was still alive went he was born and lived for 5 minutes. Doctor don't know why it happened but when I got to the hospital my cervix was dilated 1cm. It could be incompetent cervix?? It was just so hard going to this at 17 weeks and going through labor. We will always remember our little baby boy.