It all started with the brain drain,
Germany offered education to professionals from the Middle-East and sub-saharan Africa and convinced the best engineers etc who also learned the language to stay there, also France did the same from it's former colonies.
So the people who could actually contribute to those countries actually never went back, therefore the
economics opportunities in Africa is basically zero, apart from exploiting it's vast natural resources.
A popualtion boom happened in Africa and after the Arab Spring made by the nice Americans the road to Europe was cleared.
Europe used to have good leaders, for example Merkel did good things for the German industry, but she said two very stupid things when the migrants started:
"Wir schaffen das" we can manage this, "es gibt keine Obergrenze" no upper limit
Merkel thought these new migrants will want to study and work just like the 1st wave, but 94% of them just wants to use the social benefits and has no plan to work. Saudi-Arabia even built city quarters for them but no migrants going there because again they don't want to work.
EU's liberal politicians fine with it because they are either blind and think it will solve Europe's demographic issues or they do it on purpose because they know those migrants will never vote to the anti-migrant right-wing parties, so their re-election is secured this way.
Just look at the EU leaders, Von der Leyen is basically a US puppet, her family members live in the USA and Washington push her to be the next leader of NATO, they don't even hide that she serves America's interests and not the EU citizens'...
Hungary tries to solve it's demographics issues with different methods, give couples many benefits who will have kids, import workers from Vietnam and the Philippines. I'm not sure if it will work but certainly sounds more appealing than letting millions of muslims in.
I'm biased but if I were living in Western-Europe I would certainly move to Hungary or Poland if I still want to live in the civilized Europe in the future.
I'm not a fan of the authoritarian leaders like Victor Orban and Putin, but when they sound more reasonable than the US president, you know there is something wrong.