In makes sense to allocate your attention based on your ability to influence. I care more about what goes on in my country than in others because I have more power here than abroad.
I am in a communal resource sharing co-operative with my co-nationals. We pool our wealth to build schools and roads and overpriced government websites. Naturally I care about the success and survival of the things I am invested in more than the things I have no investment in.
Countries allow the competition of ideas at the scale of nations. Deng Xiaoping began Chinese economic reform in the 70s because he had learned about Singapore and Japan and other Asian nations having great economic success.
As a world we learn more quickly with competing models. It makes sense to try and ensure that the model of which you are a part functions best so as to serve as the best example to others.
It may be that you see many values in the society of your nation that are superior to the values in other nations. Perhaps you feel the rule of law, property rights, equality for women, freedom of speech and freedom from corruption are fantastic innovations in the mechanics of society and they deserve protection. Part of this protection surfaces as nationalism.
Almost all of the arguments for and against caring about your nation apply equally to the idea of caring for your family.
There is no absolutism, if your family is a bunch of drug dealing sociopaths it’s sensible to think differently about the notion of family than if they are an honest, decent supportive group.
How much you feel nationalistic pride for your own country is up to you, but the idea that nationalism has no positive aspects shows a lack of imagination.
By the way, it is clear there are many negative aspects to nationalism, and I haven’t argued that on the whole nationalism is good.