Modern states make the mistake of trying to control who has access to their land, and offering full social welfare payments to those they accept as refugees.
The biblical model is the opposite way round. People are given freedom to travel and live where they choose, but there is not state-funded social support.
Naomi’s husband was free to move to Moab when a drought caused famine in Judah (Ruth 1:1). This has been a normal way of dealing with crisis and disaster throughout human history. When war breaks out, people flee to a safer place. When famine strikes, people move to where food is still available.
The law allowed foreigners to migrate to Israel, provided they honoured God and accepted his law. However, the foreigner would not have any land in Israel, unless they could afford to buy some. They would not get any state-funded social support. They would have to work to live. They might get also get some support through gleaning, but they had to work to get it.
When Ruth and Naomi moved to Israel, Ruth was a foreigner. She was free to move into the land, but she had to find her own financial support. She went out gleaning, so that she could gather enough grain to feed herself and Naomi until she got paid employment, probably as a servant.
The biblical model is freedom of migration, but family responsibility for earning income and producing food.