Help!! Am I over reacting?

Is it safe to get fillings? I’m 23W and my dentist said I have a small cavity, and that I need a filling. Is it safe? Has any of you mommas got it pregnant?