I also had this happen in January after being 6 weeks :( very sad n difficult to deal with. But good part was we got to keep trying and I'm now 26 weeks n still nervous. I think about it all the time.
The chromosomal abnormality that caused your miscarriage can not be predicted or prevented. On the bright side, its very rare and highly unlikely that it will happen to you again.
I had the same thing happen last July. My husband and I waited 6 months to start trying and it took us 3 months of trying. Don't think about it too much! It will happen, good luck!
Try not to stress. Nothing can prevent miscarriage, it's up to your body and god. Best of luck.