After you have a miscarriage which is a bad thing because you lose the baby you're actually more fertile and have a higher chance of having another baby if you try around 3 to 4 days after the miscarriage.
You can wait as long as you want too when trying to get pregnant again but trying again 3 to 4 days after the miscarriage you'll have a very good chance of becoming pregnant.