It's important not to catasrophize merely by extrapolating trends. Trends rarely hold true, _especially_ when holding true would lead to catastrophe. But one of the _reasons_ why they often don't hold true is people start thinking about and planning for the catastrophe.
Merely saying "well we will just have more immigration" isn't a good enough answer. Partly because A) you can't _just_ do that. Japan has very clearly chosen not to take the immigration that it very easily could get to solve its demographic issue. The US, which is topping this metric largely thanks to immigrants and recent immigrants, is also experiencing a pretty widespread backlash against immigration right now, and it's tough to say what immigration rates will look like in the medium-to-long term.
So A) a country has to _allow_ immigration and B) even if they did, if nothing else changes that's merely a stop gap solution. Real solutions that increase fertility in groups where it has declined need to be found. They might find themselves, but I think it's safer to assume they won't.