Yes, because otherwise your economy and country collapse sooner or later. ie everyone dies. Why do think homogenous countries like Japan and South Korea are finally opening up the immigration floodgates? Because there’s currently no other choice. The other options (directly lowering the costs of child care, lowering work hours, robots, et al) still haven’t worked. Immigration buys you time.
If you don’t want immigration, but you still want to buy time then you have to end socialist entitlement programs for the elderly.