Indeed, nationalism is toxic and tends to cause wars, but so is its opposite, internationalism, which has motivated quite a lot of wars and murder in several of its guises down the years.
As in all things in the fallen world, striking the right balance and falling off the royal road neither on the left nor on the right is tricky.