Nationalism tends to rise when people feel under pressure and life is tough.
Capitalism is failing millions and millions of people. People’s lives are getting harder, they are working harder under worse conditions, and not seeing any benefit of this.
As this happens it becomes very easy for the real racists to convince them to blame the outsider rather than the system that is actually at fault.
This happened in Europe in the early 20th Century, and in Germany in the 30s, and in both cases led to world wars.
People are struggling, and the solution is a glorified Ponzi scheme which protects itself by shifting the blame to other people. Nationalism invariably follows.