The "migrant wave" is a bit more complex than that and largely manufactured and artificially intensified as a political talking point which the AfD (and other far-right movements in Europe) primarily benefited from.

Some factors involved are:

- Turkey and other "gateway" states closing their outbound borders to Europe in return for financial and political favors, thus preventing "migrants" (mostly refugees and asylum seekers, legitimate or not) from moving into Europe - Libya even went so far as to imprison migrants on spurious charges

- the lackluster handling of post-war Iraq and Afghanistan and the lukewarm involvement by Western powers in the Arab Spring creating a power vaccuum filled that allowed for the rise of ISIS and prolonged the Syrian civil war (which even saw an absurd NATO-internal confrontation between Turkey-backed ISIS-affiliated groups and US-backed Kurdish Rojava - until the US pulled out)

- brutal and at times legally dubious treatment of "migrants" by EU border countries (e.g. preventing rescue attempts at sea resulting in people drowning that could otherwise have been saved, "refugee camps" in places like Lampedusa or tent cities near the French-UK transit lines)

- countries like Germany being unwilling or very slow to allocate more resources to the actual processing of "migrants" and asylum requests or the housing and aid provided to them (contrast this with the "quick and unbureaucratic help" immediately extended to Ukranian refugees where politicians literally said the refugee housing was inadequate for them - legally, Ukranian refugees were and still are treated more like foreign EU citizens rather than as refugees when it comes to various permits and benefits)

In effect, the 2015 "migrant wave" was rather uneventful in Germany if you look at the actual numbers. It was a temporary spike followed by a statistically high plateau in 2016 caused by the bureaucratic backlog rather than a still ongoing "wave". But of course there was a trendic topic of a "migrant wave" present throughout the media and heavily utilized by the AfD as one of the only parties to run with it and use it to their advantage (whereas none of the other parties really had any interest in debunking it wholesale, thus just appearing rhetorically weak).

Prior to the sanctions that followed the invasion of Ukraine, Russia had very successfully seeded right-wing movements in Western countries and used social media, RT and Sputnik to provide a "counter-narrative" to mainstream and public news. It's telling that when the sanctions started, a lot of the COVID deniers rebranded as "peace movements" and often explicitly used Russian flags as symbols of solidarity while calling for an end to military aid to Ukraine.

Yes, the Western nations are hardly innocent when it comes to interfering in or outright invading in foreign countries, especially in the Middle East, but neither is Russia although Russian interference is historically less blatant and less open, often using plausible deniability or multiple parallel constructions (i.e. less misinfo or disinfo and more undermining the trust in any form of info altogether by pushing multiple mutually contradictory alternative explanations).