Proximity. And economy.
Muslims are going to Europe because that's where the money is and it's closer. The ones in England are from former British colonies, so they're basically former subjects coming home. Same with France. Moroccans and Algerians are going to France, not to Britain, and Pakistanis and other Indians are going to the UK, France.
Over half of the population of Jordan are Palestinian refugees or the descendants of. Israel is currently bombing the hell out of Lebanon using the excuse of Palestinians who had sought refuge there. Since Israel refuses the right of return for Palestinians who temporarily fled fighting, other countries might be reluctant to take them in given that being arid and resource poor and rather lacking in suitable space, what they have to make available is rather limited, and that by taking them in they would basically be endorsing Israel's policies of refusing their return.
Iran has more refugees than any other country in the world, many of them Afghanis fleeing decades of turmoil there. Iran is also where most Armenians fled to when Turkey was trying to exterminate them a century ago.
Europe is taking in a lot of Middle Easterners and Africans because somebody has to wash the dishes and take care of granny and it's a bit of a trip for Mexicans to get to. An aging and shrinking population still requires a workforce. Also, they also wouldn't mind replicating the American magic of a mixture of cultures producing economic & technological innovations.
America has depended on a steady stream of foreigners for those reasons. 1/3 of a billion greedy immigrants and their descendants is the reason for our booming GDP. And face it, look at science, look at your doctor, your dentist... where do they come from? Elon didn't say screw MAGA, let's bring in the Indians because he was trying to be funny. We need brains and we need ambition, and if we can't produce them, we'll just import them.