Here is a mostly non-technical explanation of how "AI" works. The phrase "artificial intelligence" is a bit of a misnomer, because software programs like ChatGPT are not "thinking" at all. The technical term for them is Large Language Models, or LLMs. Large language models process enormous amounts of written material and then use some sophisticated math to analyze that material and then be able to reformulate it into coherent text based on a user query.
The problem with "AI" is that it cannot escape the old programming rule of thumb "Garbage In, Garbage Out," or GIGO for short. If an AI is fed incorrect information, that will affect the quality and correctness of its answers. Large language models will continue to be developed and will have some very useful applications if the inputs are carefully controlled. But just turning a large language model loose on the Internet and having it vacuum up every Web page it finds is going to be less than optimal.