AI will be what ends humanity. Stories where robots turn against humans were correct, except they won't do it because they're smart, they'll do it because humans are stupid.
The way neural networks work is that people throw a fuckton of data at them, and that results in some kind of convincing/impressive result, but the reason it looks impressive or smart is because it's a bunch of human-produced data mangled together. The important thing to note there is that it's not controlled. People aren't currently in control of what AI models do, you can put up some filters like rejecting input/output that has no-no words in them, or trying to filter what the AI model is trained on, but that kind of thing will become impossible to control properly when the output of the neural network becomes more complex than just spitting out answers to fixed problems and the input becomes more complex than reacting to controlled chunks of data and the training data needs to be massive enough to create general intelligence.
People will create something that they can't control because they were never really in control of what they were creating in the first place, and that thing will be the end of humanity.