Nationalism is a form of state supporting ideology specific to capitalist society. Nationalism is an idea. Its function is to persuade people to be loyal to a state or to a government. Nationalism is the idea that makes people who live in a state think of themselves as citizens of that state.
French nationalism makes people who live in the French state think that they are French.
The function of French nationalism is therefore to make people who live there loyal to the French state. The function of British nationalism is to make people loyal to the British government. People who are loyal to a government do what the government tells them. To win people's support the state uses all sorts of symbols and myths. These are called national symbols or national tradition.