The AfD's only selling point is that they'll end immigration.
Here's what happened: 2.6 migrants coming to Germany in 2022 alone. Net migration into Germany in 2022: +1.4 million.
There are many germans (and many people in the EU) who don't like to see mass-migration from Africa and the middle east.
It's those who let that happen (and pushed for it) who are responsible for people voting for extremist political parties.
The same is happening in France and even Gabriel Attal (ex french prime minister) said France failed to control both its legal and illegal migration and that now he wants to only allow in migrants who are coming to actually work (Gabriel Attal is probably going to be a candidate to be the next french president).
You cannot look at the AfD and say "bad AfD" / "evil neo-nazis germans who voted for them" and not take a cold hard look at what happened with migration in the EU these last years.