Why would you leave her alone? Is this what you'd expect her to do if you were in her shoes?
The worst thing people can do is not acknowledge this at all. You need to reach out to her and say you're really sorry for her loss, ask how she is doing, say that you are always there for her and whether there's anything you can do. She may be devastated, or not. She might be looking at this as a death of her baby, or a loss of an embryo. She might be in deep grief, or looking towards the future and trying again, or both. All this may change within days or weeks, too. It's hard to tell without speaking to her first.
But if people around you don't acknowledge what's happened at all, it's probably the worst. If she's reached out to you, then it's probably a sign she needs you there. If you don't know what to say, let her speak whenever she needs to.
Also, she may resent you for having a third child and it's completely natural. Thus will likely ease off in time, but now you can't blame her for it. Equally, she might not feel this way, again, you won't know if you don't speak to her.
Loss of a baby to many people is similar to losing a close family member, with an added layer of having the maternal bond, losing your hopes and expectations, often shock, hormones going up and down, and of course the physical delivery. It's a multi-layered trauma and everyone deals with it differently, depending on the circumstances.
I always say, do not tell people things you wouldn't say if their mother died. You wouldn't come and say "Oh, at least you had a mother" or "You still have your dad". Equally, things like "At least you got pregnant again" or "You have two lovely kids already" are a no-no.
I also think this is a situation that clearly shows you who your friends are and who's in your tribe, so if she's your dearest friend, show her that now. She'll appreciate it xx