Globalization and liberalism primarily benefit educated elites in developed countries and those in developing countries, and they primarily hurt the middle and lower classes in developed countries.
This is an intractable problem. You can have global free markets, you can have national sovereignty, and you can have a healthy democracy. But when you try to have all three, it puts immense pressure on the internal political dynamics of nation-states. And so it makes national politics in developed countries easily exploitable by populists and nationalists who either want to kill global free markets or democracy or both.