Sounds like the plot from the movie matrix. Only difference between the movie and our real timeline - the ai didn't need to enslave humans, we willingly chose enslavement by ai for ourselves by continuing our google subscription.
It also sounds like Ready Player One, where the real world is so shit, everyone spends all their time in VR, using rented equipment, making nearly everyone a slave to the corporations.
The people building AI must be deeply unhappy, and won't be satisfied until they impose their misery on everyone.
Ultra nerdy point: in the matrix it’s revealed that humans did in fact choose to join it. And the meta point was that most of them still would choose it over reality [1] every day.
[1] reality is also somewhat in question in the films universe
loading story #50264808