Yes, you can get a cavity filled during pregnancy.
Good oral hygiene in general, even outside of pregnancy, helps improve overall health throughout your lifespan. If you maintain quality dental health and even see your dentist regularly during the pregnancy, you decrease your chance of passing unhealthy oral bacteria to your baby after they’re born.
During pregnancy, you can safely get dental x-rays and other oral procedures1 like cavity fillings. It’s also safe to get local anesthetic with or without epinephrine—thank goodness! Can you imagine getting a filling without it? Any urgent dental procedures like root canals or extractions can also be safely done while pregnant and shouldn’t be delayed.