Like said in reply to other comments, the fundamental problem with immigration as a solution, is that it takes skilled workers and motivated workers from developing countries, which hinders their development. It also simply pushes the problem further into the future, because developing countries will eventually end up with the same problem. Most are already heading towards this, if they have not yet encountered the beginnings of it.
That’s why it’s far better to try and solve the problem which is putting people off having children in the first place, which is the cost of living and having children. Paradoxically, it seems the more technologically advanced we become, the more expensive living and having children becomes. We need to break this trend.