I imagine that human beings have been imagining the end of the world for as long as humans have had civilization. Maybe they were imagining the end of the world when they were hunter/gatherers but I tend to think of world ending stories as stories of the collapse of civilization. Before civilization, specifically the sort of civilization that arises for agriculture, humans lived as members of small tribes and could carry their possessions from place to place as needed. After civilization humans had walls and buildings and … stuff. Stuff that filled buildings and required walls. And when humans have stuff they worry about losing it.
The world will end someday. The world as we, 20th/21st Century people, recognize it. Homo Sapiens as a species will go extinct. I hope that will be because a form of humanity evolves that peacefully replaces us. The earth and life will go on. The stuff we leave behind will be consumed by whatever nature throws at it. Or perhaps our descendants will pack it all up and recycle it. If so, good for them.