Question about flouride and dental health

I grew up in the country on well water, which of course didn't contain flouride. My parents also didn't really understand/care about general or dental health. As a result, I ate a lot of sugary foods/candy, drank soda, the whole 9 yards. While I did probably brush my teeth daily, it wasn't unusual to skip a brushing, and we definitely didn't floss. All this to say, I never had a single cavity until I was 18 years old, and it was so small that the dentist barely had to fill it.

Once I turned 18, I moved to a major metropolitan area, which obviously did have flouride in the drinking water. Since I was living on my own and in control of my food/drink intake, I became passionate about health and wellness, and started eating very healthy, stopped drinking soda, rarely ate candy/sugary foods etc. I also improved my dental hygiene 100%. Within the few years following my move to the city, my teeth started continuously getting cavities, and it has been downhill ever since in the last 10 years. I am the healthiest I've ever been right now, don't eat processed foods, rarely eat sugar, no soda/sugary drinks etc. and I am in need of several fillings and two root canals, despite brushing 2x a day and flossing every day as well.

What could the reasoning behind this be? Genetics? Bad luck? Coincidence? I'm not anti-flouride at all, but am wondering if anyone has any insight as to why my dental health got worse after introducing flouridated water.