It has been noted that persons have responded differently to different groups of refugees; a number of examples have been in the news recently.
Here in the States, for example, some want to build a wall go keep out persons from Central America fleeing violence and climate change, while welcoming persons fleeing Putin’s invasion of Ukraine. (And this is not a new phenomenon.)
In a timely post at Psychology Today Blogs, Professor Natalia Kucirkova explores the reasons for this.
I commend it to your attention.