No, it's called education and life experience.
It was taught in school as part of our history classes, since nationalism has been the cause of much human misery and patriotism the driver of human flourishing. Outside of the school curriculum, I grew up in a region that had an active KKK chapter and, on at least one occasion, was specifically attacked by a fellow student (his parents were KKK) because my mother and her family were not born in the U.S.
There was much writing on the difference between patriotism and nationalism in the 20th century, especially after the rise of Nazism and fascism and the calamity and death they brought to the world.
"Patriotism is when love of your own people comes first; nationalism, when hate for people other than your own comes first" — Charles de Gaulle
“Nationalism is not to be confused with patriotism. Both words are normally used in so vague a way that any definition is liable to be challenged, but one must draw a distinction between them, since two different and even opposing ideas are involved. By ‘patriotism’ I mean devotion to a particular place and a particular way of life, which one believes to be the best in the world but has no wish to force on other people. Patriotism is of its nature defensive, both militarily and culturally. Nationalism, on the other hand, is inseparable from the desire for power. The abiding purpose of every nationalist is to secure more power and more prestige, not for himself but for the nation or other unit in which he has chosen to sink his own individuality.” - George Orwell (1945)
“The difference between patriotism and nationalism is that the patriot is proud of his country for what it does, and the nationalist is proud of his country no matter what it does; the first attitude creates a feeling of responsibility, but the second a feeling of blind arrogance that leads to war.” - Sydney J. Harris (1953)
“Patriotism is a lively sense of collective responsibility. Nationalism is a silly cock crowing on its own dunghill.” - Richard Aldington (1931)