Depopulation can happen relatively quickly. It’s thought that China might only be 750 million people in 2100.
We are in no danger of going extinct as a species.
Even biblically, if you incline that way, we lose half. Thats still like 4-5 billion people left.