Baby inhaled poop?

haira

So I delivered my baby via emergency c section due to her heart rate slowing down. And now she’s in the nicu because she inhaled poop while in my uterus. She’s now on a ventilator because she can’t breathe on her own. I’m so sad and wonder what I did wrong for this to happen. Has this happened to any of you and your baby got better?