It was a beautiful custom in ancient Israel that, after the reapers have collected the harvest on a field, that they should not go through it again and pick up every single ear of wheat.
Whatever wheat was not gathered by the workers on the field was left for the poor to pick up, and this was called “gleaning”:
When you reap the harvest of your land, you shall not be so thorough that you reap the field to its very edge, nor shall you gather the gleanings of your harvest. These things you shall leave for the poor and the alien. (Lev 23:22)
See, things can work without a welfare state.