But you're missing the point that the population of Japan specifically is on the decline and has been for decades.
Even if we take out the cost of pensions for the elderly out of the equation, if people aren't having kids to replace themselves, there won't be enough working age people to fill every job needed.
For reference, the Japanese birth rate as of June 2024 was only 1.2. If that trend continues, in say 20-30 years, there will be about 1/2 of adults then as there are now.
The easiest and most immediate solution for Japan (and South Korea which is also having the same problem) would be to ease immigration so that more people can come in to work. But that doesn't help in the long run nor does it address the cultural and societal factors that have lead to this point. And even then, since both countries are so homogenous, it would be hard for natives to accept a huge influx of immigrants.
To be fair, these last 3 months have felt like 3 years so maybe they're on to something.