https://www.youtube.com/watch?v=0sVzWOYaM9w
Reportedly, an ice age in Europe led to the drying of Africa, reducing the Homo sapiens population to about 7,000 individuals living along the southern coast of Africa. However, this event marked the beginning of the Upper Paleolithic period, during which humans learned to fish, built the first permanent settlements, and invented new tools. It has been theorized that this behavioral shift was due to genetic changes, but I believe it was simply a case of necessity being the mother of invention.
When the ice age ended—roughly 50,000 years ago—these better-equipped humans gradually spread across the rest of the world.
I also heard that a climate-related disaster drastically reduced the Homo erectus population—from around one million individuals to just a few thousand—approximately 980,000 years ago.
In both cases, I'm glad they didn't go extinct.