I have had multiple miscarriages, but it was the first that really hurt. I was at 20 weeks, but didn't know the baby had died for a few more weeks. Everyone else in my office was pregnant. I was the only one who had been trying (for a year) to get pregnant.
It was kind of awkward, because I didn't want a pity party. I grieved. I felt sad. I was aware that my friends wanted to be there for me. I was grateful for those who expressed it and I was grateful for a friend who would just hang out with me, sad or happy. You don't have to say much. You don't have to understand. What really matters is just going through life as a friend, just being.
Invite her out for coffee or shopping or a movie or whatever you normally do. She'll be grateful for your presence. Offer to help her with whatever she needs, to be a good listener if she needs one (you only have to listen, not advise or counsel), but let her initiate those conversations. Just be. Just be a her normal, trusty friend. She'll be so grateful for that.
You're a sweet person. She's lucky to have you in her life.