Every country in the world is trying to solve the same problem: how to preserve economic growth despite a shrinking population and declining productivity.
The USA and western Europe chose to resolve it with immigration.
Japan & (some of) Eastern Europe chose to resolve it without immigration.
Japan is the economic canary because they had a 15+ year head start, and had the best discipline with immigration control. Their economic indicators are trailing-signals of the demographic freefall. Debt can only patch it for so long.