Help please!

I got a really bad wisdom tooth and I put it off for so long because I can’t afford the expenses and it’s been putting me through so much stress! I am pregnant now and I’m scared that any bacteria will go into my baby? Idk it was just a random thought, I been brushing and everything! The tooth has a hole in it. I’m going to the dentist ASAP and try to see what I can do. But can someone please put my mind at ease.