Avoid sweet sticky foods. Foods such as taffy, caramels and soft candies will stick to your teeth and cause cavities. If you want to occasionally enjoy these sweet treats, immediately brush and floss your teeth after eating them. Brushing and flossing immediately after eating these sticky foods will protect your teeth from cavities.