I feel like a bad mom already

So they had to give me a starioid shot to get my sons lungs to delovep faster. Because my anxiety and stress levels are so high it's causeing complications. I tried so hard not to get stressed. I tried not to freak out over nothing. Now I messed up my pregnancy.