>>512393687 (OP)
Don't spread misinformation.
Having a cavity means that bacteries got through the enamel and it started dissolving the dnetin. The dentist removes the rotten dentin and then closes the tooth.
Anyways, your body already produces teeth healing material called saliva. Whch is rich in minerals.
But our modern diet and the frequent eating damages the teeth at a faster rate than saliva can rebuild it.
Bacteries thrive in acidic environment, which happens after you eat.
The microorganisms also love the bloatload of refined sugar we take in every day which makes the situation even worse.
It makes a thin film on the surface of the teeth and after half a day or so, it begins to harden.
Tl;dr: if you want to have healthy teeth go to the dentist and fix it.
Then fix your diet, don't eat sugary fooods, don't snack often and brush your teeth 2 times a day to remove plaque. Learn proper brushing technique. Also clean it between the teeth with a waterpick or with a floss.