When is the right time to take a pregnancy test?

I had a miscarriage about a month ago. I was pretty devastated, but thank God it all ended well. Doctor said I can start trying again anytime. Today I was supposed to start my period but not yet, and 2 days ago I had a little spotting and it stopped. I am really scared to take a pregnancy test and see a negative sign. Deep inside me I want to take it, but I also want to wait but just don’t know how long.....