Cavity formation requires the presence of several factors, like the presence of plaque bacteria, sugary or acidic diet, and passing of time.
There are preventative measures you can take against cavities, since the biggest factors in their formation are diet and oral hygiene. We recommend regular annual checkups so we can detect changes on time, before they develop into bigger problems.