I clarify:
Let’s say scientists can’t come up with solutions to global problems, AI gets out of control and turns almost everyone into paperclips during wars, and in the 2040s or 2050s, the surviving people (about a few tens of millions around the world or even less) gradually return to the level of intelligence of their distant ancestors?


Fair point. I guess I will try to invent blacksmithing.
(not that I think a return to the neolithic is a likely scenario - some knowledge will stick around, regardless of how far we fall in population, resources, and technology)