How long did it take you to conceive after a miscarriage?

Hello,

I have been trying to get pregnant for 3 years. During that time I have had two miscarriages. I’m starting to feel like I may never get the opportunity to be a mother. How long did it take you to get pregnant after having a miscarriage and Is there anything that can help me to prevent miscarrying when I get pregnant again?

I’m slightly more concerned because I’m 30 and I have endometriosis so I’m worried that my time is running out.

Thank you x