Rossumovi Univerzální Roboti – also known as R.U.R. (pronounced er oo er (like in error)) is a Czech play by Karel Čapek which details the events leading up to the robot uprising, which resulted in the extinction of humanity.
It’s the origin of the word ‘robot’ and has the honor of being one of the first depictions of a robot uprising in fiction.
That’s all I’ll say for now. I read a comic-book adaptation of it and have known the plot for a while now. It’s very similar to another story by Čapek called The War of the Newts which, yes, is a thing. The latter is supposedly more comedic, but they’re basically exactly the same bar the fact the Newts go extinct and humanity survives in Waterworld.