Take your prenatals before you become pregnant and eat right and don't do drugs or drink. Other than that it's up to mother nature.
Just take care of yourself but other than that, there isn't much you can do to stop a miscarriage if one is going to happen.
I wish I had the answer to that but you can never keep from having a miscarriage. All you can do is try to give your future pregnancy a very healthy start. Taking prenatals months before conceiving. Not smoking or drinking and eating healthy/ drinking lots of water. Best wishes to you!
Unfortunately in the 1st trimester there really isn't anything you can do to prevent a misacarriage. I had 3 back to back, all before I made it to 10weeks, before the drs would test me and they didn't find anything wrong with me. Finally this pregnancy held and on pins and needles I made it out of the first trimester. Starting at 15 weeks I'm getting a hydroxyprogesterone shot once a week to help me make it to term. I'm currently 33 weeks 5 days and I've got 3 more weeks of shots. Idk if it's the shots helping me or if this baby was just meant to be. Good luck and I know it's hard to not get discouraged. I went thru all the emotions guilt was a big one. Message me if you need to chat more.