Simply put:
"Patriotism is the feeling and expression of love for one’s home country, along with a feeling of unity with those who share those feelings.
Though it shares patriotism’s love of country, nationalism is the belief that one’s home county is superior to all others.
While considered a necessary attribute of good citizenship, when patriotism becomes politically mandatory, it can cross a line."
https://www.thoughtco.com/patriotism-and-nationalism-4178864
The last sentence is key: another way of looking at nationalism is as "mandatory patriotism", as in "fire the guy who kneels during the Anthem even though he's protesting documented police brutality and he has a Constitutional right to protest."
Outside the military (where I served for twenty years), mandatory patriotism isn't patriotism - it's despotism. Also, patriotism should never be a given - instead, a nation must earn its citizens' patriotism. But nationalism is "thou shalt be patriotic no matter what."