Nationalism = identification with one's own nation and support for its interests, especially to the exclusion or detriment of the interests of other nations.
first part (identification with one's own nation and support for its interests) is obviously required for any society to work. If people don't support nations' interests there is no point in even having nation, because a nation is just a group of people who work together for common interests.
Second part (especially to the exclusion or detriment of the interests of other nations) is just as important. If a nation doesn't work to the exclusion of the interests of other nations, then for example Denmark would give same benefits to africans as to Danish. if you don't believe a nation should work to the exclusion of the interests of other nations, then you think it is morally wrong for the german government to build roads in germany, and they should build just as many roads in china as well because only building roads in germany is to the exclusion of the interests of other nations.
For the detriment part of the definition, if the English government pays for medical care for all English people, instead of every person in the world, that is to the detriment of every person in the world that is not English. Basically, if you are not a nationalist you don't think countries should exist. A nation is like a family, a nationalist wants to use the wealth generated by the family to help their brothers and sisters whereas a non nationalist thinks that wealth should be evenly distributed amongst every other person in the world.