>>17927753
There's also the fact that the socialist states of the 20th century were ridiculous oppressive shitholes and this is such a PR disaster that it's nearly impossible to bounce back from.
Add to that the fact that communists themselves disagree on how bringing forth communism would look like. It's hardly a very convincing ideology when its purveyors don't know or can't reach common ground on how to implement it.
And yes, class struggle is not that compelling of an idea in the wealthy West. In famine-ridden Imperial Russia, yes. In consumerist America, not quite.
So it's not surprising at all that leftism as a whole sidelined or abandoned communism in favor of identity politics.