The question of whether to give to those in need is ill-posed; it omits an essential parameter: Are resources scarce or plentiful?
When resources are plentiful, the act of charity has a moral circumference that includes giver and recipient, alone. When resources are scarce, charity affects everyone dependent upon those resources. Resources are now scarce.
We live at a point in history when humanity can permanently exhaust the planet’s fish supply, through overconsumption.
When a nation starves, granting it foreign aid, to purchase food at the global market, impacts all who go there to feed, and all who wish to in the future.
When a citizen starves, granting them social support, financed by debt, burdens future generations who service that debt.
In times of scarcity, charity is a choice between strangers, now, or family, in the future.