I would like to clear some things up about how cavities/ caries come to be. Source: my GF is an experienced dental hygienist with her own office in Prague, Czechia.
You can assume that nobody is immune so the whole genetic resistance angle is a myth. With that cleared up, how does a cavity/ caries come to be?

When we eat or drink the bacteria gets nutrients (any form of sugar) and builds up plaque and the bacteria create an acid. Because the plaque stays on our teeth above and even slightly bellow the gums (gingiva) and the bacteria likes to live there the effects are strongest where the plaque is. The bacteria and the resulting acid over time cause demineralisation, dissolves the calcium in the teeth. After some time this leads to decay which we describe as cavity/ caries.
Also, the plaque can solidify into a build-up of tartar/ calculus which further provides a nice habitat for bacteria, causing gingivitis (inflamation of the gums - they become red and swollen) spreads the sulcus, basically splitting gums from the teeth over time which results in periodontitis, which is basically loss of the bone and other problems below the gums. Periodontitis can also exacerbate other illnesses such as diabetes, cardiovascular illnesses, possibly some allergies (active research). This can really only be fixed by a professional dentist or dental hygienist since removing the tartar, especially under the gums, is a precise and demanding. The procedure can be painful without local anesthetics.

If you don't want all that do brush your teeth correctly each day. The 2 minutes number is myth again - do brush until the teeth are free from plaque. It is easier with a sonic/electric toothbrush, e.g. by Phillips or Oral B iO should be ok too. The brushing technique is very important, most people do this wrong. The brush should be at 45° to the sulcus (half of the bristles is on the gums the other on the tooth). Obviously also brush the top of the teeth. Each tooth basically has 5 surfaces, top and 4 sides. Don't forget to use correctly sized interdental brushes. Your dentist or dental hygienist should be able to help you find the correct sizes for specific spaces between teeth. (You will probably end up with TePe or Curaprox and probably more than one size.) You can use a solo brush too, which brushes exactly one tooth at a time. The bristles of the brush should be as soft as possible and removal of bigger amounts of plaque are done by spending more time instead of force/ pressure/ hardness/ abrasiveness. In addition to not replacement of interdental brushes, you can also use a super floss (the middle is made of a fluffy material) but learn a good technique so you don't hurt your gums, throw the thin waxed floss in the trash especially if you are not super handy/ careful as to not cut your gums. Also, the floss does not clean premolars and molars properly because of the shape of the teeth in interdental space (because of their concavity, imagine that the surface is basically made of two pillars).

Do have a regular appointment with your dentist and dental hygienist. 2x a year should be enough with good hygiene. If you have more problems, the frequency of appointments will of course vary. They should definitely do at least intraoral x-rays each preventive appointment and a OrthoPantomoGraph in ~2 years.