You've heard the saying "Sticks & stones may break my bones but words may never hurt me". Well, the truth of the matter is, words DO hurt. Words hurt long after the scar from whatever wound the stick or stone gave you. The scar may go away but the reminder or constant replay of the words you've said will hurt for a lifetime.
Many times, after the birthing family experiences a loss of a baby (miscarriage, stillbirth, abortion, etc) people don't know what to say or how to comfort the family/person. I've been told "at least it happened early", "it was God's timing", "it was in God's plan", "something was going to be wrong with the baby, "God took your baby away because you weren't married". Those words hurt me and they also stuck with me years after both of my losses. It doesn't matter when you lost the baby (early or later during the pregnancy). It also doesn't matter if you're married or not (my parents weren't married when I was conceived/born). It doesn't matter if something was going to be wrong with the baby or not. I still carried my babies and those losses still hurt both times.
How can you support a family or person after a pregnancy or infant loss? You can them if they need you to do anything (i.e. run errands, clean up, cook dinner, etc.). You can also ask them how you can support them (i.e. bring resources, books, help plan the funeral/memorial). It would also be beneficial to help create memories (i.e. shadow box/memory box, memorial blanket, etc.). You can also gift the person or family a bereavement doula to help them through the loss. A bereavement doula is trained to help families with loss and will be able to talk to the person or family for weeks, months, or years after the loss happened.