A theory of decline
One of the periodically recurring tropes in anime is humanity being in decline; not through a loud apocalypse or for any visible reason, but people are just quietly diminishing. This season's Jinrui wa Suitai Shimashita puts this in the series premise (the title of the show means 'Humanity Has Declined') but there are plenty of others, such as Sora no Woto and the classic Yokohama Kaidashi Kikou. In the version of the trope that I'm thinking of, the cause of the decline is never stated (and the decline itself is often just a background detail, not the main focus of the show). One of the things that this generates is a lot of speculation about why humanity is in decline in any particular show. What catastrophe do the creators imagine having hit us?
As it happens, I have a theory on this. Japanese creators are almost uniquely placed to vividly feel one particular quiet catastrophe in real life: a low birth rate. The Japanese total fertility rate is one of the lowest in the world, well under the replacement rate necessary to just hold the population level constant (see eg Wikipedia). The effects of this decline are apparently visible all over Japan, especially in less attractive areas with lower populations. The whole issue is considered a serious problem (especially when combined with an aging population), with various government attempts to encourage children, discussion in the press, and so on. Extrapolating Japan's very real issue with a low birth rate into a future setting is a natural thing to do.
(As you'd expect, I believe that one of the most visible signs is fewer and fewer schools with fewer and fewer pupils. This has cropped up as a plot point in contemporary shows; for example, I remember the climax of the GTO live action series taking place at a now-shut-down rural school that one of the characters had attended.)
A really low birth rate is a great fit for the typical anime decline of humanity. It's slow but devastating, it's quiet, and there's nothing really to fight or to make a fuss about. There's no singular event that's causing the problem, just a whole collection of small individual decisions. Life goes on, the world shrinks (because there are fewer and fewer people in it), and so on.
(And with fewer people in the world you start to progressively lose technology that you no longer have the manpower to run the infrastructure for. It takes a lot of people all through a supply chain to run a modern chip fab, for example, especially once you include things like the transportation infrastructure, the water supply, and so on.)