Capitalism: an economic and political system in which a country's trade and industry are controlled by private owners for profit, rather than by the state. Socialism: a political and economic theory of social organization which advocates that the means of production, distribution, and exchange should be owned or regulated by the community as a whole.
Modern nation states are not always formed based on nationalist feeling: often, they are geographical (and people in one geographical region do not necessarily share cultures or languages, as the various different ethnic groups of Nigeria) or political constructions which change over time and depending on who controls them. For example, many borders shifted in the twentieth century with the collapse of the British Empire. Modern nationalism, then, can instead be said to be manufactured by the conditions of these states because it is beneficial to those controlling them that the citizens are loyal and believe in defending their state against outsiders.  These modern states have formed what we now think of as the world order, so manufactured nationalism and patriotism is necessary for this order to be maintained, often for the benefit of those in charge.
Many modern societies are formed as a direct result of nationalist feeling amongst groups. For example, the partition of India by the British government in 1947 was based on different nationalist loyalties within India: Muslims were loyal to Muslim leaders, and Hindus to their own existing positions in the Indian state.  The division of India into two states - one Muslim and one Hindu - was based on nationalism which existed before the two states did, not the other way around.
This argument is often made by modern socialist thinkers who see nationalism as a way for capitalist ruling powers to divide the unity all people should feel in favour of smaller nationalist groups. In this context, nationalism is seen as a recent phenomenon (at least, on a large scale) which exists to benefit modern political regimes.
Modern nation states are often geographical and political, meaning their borders and the people in them can change. Nationalism is therefore necessary to help those who control the state stay in control.
Rejecting the premises
States are also often cultural, meaning nationalism is not necessarily manufactured.