I don’t believe in taking medication while pregnant

But I’ve been straining on the toilet and my doctor recommended colace. Now that I’ve taken it I’m completely nervous that something is going wrong. I’m nauseous, dizzy and nervous that I just harmed the baby. I couldn’t find any horror stories online but now I’m nervous.