When you tell people is deeply personal.
It depends on how you think you will feel if you have to tell them bad news a few weeks later.
I'd 2 mc before dd and was dx with endo too so dds pregnancy was high risk throughout.
For me I didn't feel comfortable telling anyone (except work in case I took unwell there as 2nd mc was also partly ectopic and even then I only told my boss who'd also had mcs) until I was at least 14 weeks as that's when the first trimester really ends which is the highest risk time.
But even then we only told immediate family then told close friends around 5.5 months as I was starting to show, then gradually everyone else.
First pregnancies I think are higher risk too?
To be honest I didn't even start to relax until I/she was at a viable stage and even then only a little. Even when she was born didn't relax straight away (difficult birth for both and she was in scbu for a while)
But she is a big lump of 19 now!
It's just hard not to worry especially if you've been through loss before, and actually there's very little you can do to prevent.
Try to enjoy as best you can, take it easy and in all likelihood all will be well