I am sorry for your loss but if this is your first time and it's an early miscarriage, you really should not worry about it. The official rate is 25% however the actual rate is as high as 60% since most people didn't even realise they are pregnant before they miscarried, they just thought the period's late for a couple of days. So, this is completely normal, don't stress about it. Most likely there is no reason. If it keeps happening for more three times, that's when tests are conducted.

So, just try again when you are ready.