Miscarriage May 18

Antoinette
This is my first post about my m/c I was ten weeks but the u/s showed my baby only being 6,2 with not heart beat... It was the worst pain even with rx med, I had a follow up appt, and my doc suggested three months before we try again, does anyone know what the reason would be?