Sodium fluoride is an industrial byproduct from, don't quote me but I think aluminium production.
Some corrupt scientists accepted money from corporations to make up studies that link fluoride consumption to dental improvements.
Populations who eat a diet naturally high in * calcium fluoride * have stronger healthier teeth.
There's no evidence, at least that I'm aware of that sodium fluoride is good for teeth, it actually causes dental fluorosis (because your body mistakes the sodium fluoride for calcium fluoride) which makes your teeth and bones brittle.
If you google search "dental fluorosis" and look at the pictures then pay attention to the people you speak to irl you'll notice this issue is extremely widespread.
It's the unholy alliance between big pharma chemical companies and industrial manufacturing.
Instead of paying money to dispose of a toxic by-product, they get paid to dump it into our drinking water.
Most of the cognitive issues people claim are caused by fluoride don't have much evidence to support (there is some but honestly the research just isnt being done)
Lead, pfas chemicals, and airborne microplastics are all way way bigger concerns in my opinion.