you can't really 'prevent' a miscarriage, normally - a miscarriage has to do with the baby, not you.
So as long as you aren't putting your health or baby's health at risk, then there's not much you can do.
I really don't think you can do anything to prevent it... Some people do everything right ms still miscarry. Just don't worry about it! Worrying makes it worse for you.
Try to relax I worried also at the beginning of my pregnancy now I'm due tomorrow and so far he's healthy and I had no complications with my pregnancy..good luck!