The infection into the nerve is usually caused by trauma to the tooth that doesn’t break it (one time hit or continued grinding or clenching), a deep cavity that is into or at least close to the nerve, or an old filling (usually amalgam/silver) that has led to cracks in the tooth.
Best way to prevent it is to see you Dental team regularly so they can monitor them before they break or before a cavity gets deep. At home you can prevent the problem by flossing before brushing 1-2x a day, using an electric toothbrush twice a day using fluoride based toothpaste and then finish with a good anti bacterial, alcohol free mouth rinse.
-use a tongue scraper (not just your tooth brush), brush the roof of your mouth, and your cheeks, too.
-stay hydrated, as dry mouth causes bad breath
-check your medications, hundreds of medications have a side effect listed as Xerostomia or dry mouth
-use an oral care system like Biotene that is designed to help with dry mouth
-ask your dental team about Xylimelts as that is another product we have had good success using for our patients.