The human population isn’t homogenous. Some regions and cultures have a lot more children per woman than others. So some demographics will experience population decline and others will continue growing. Overall, the world population may go into decline, but we are a very long way away from anything resembling extinction.