Want to try again!

It's been a couple months sense I've miscarried it's been so hard but we want to try again but I'm scared to actually have sex again I'm scared it will hurt how long should one wait after something like that ?.