It is completely natural that a person loves his nation, motherland, city, street or village, a person is born upon the same that he loves his home and his room and Islam never forbade this kind of love and it is valid and appropriate to show the love which someone has for his beloved country.
Anas bin Malik رضیﷲ عنه said
أَنَّ النَّبِيَّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ، كَانَ إِذَا قَدِمَ مِنْ سَفَرٍ، فَنَظَرَ إِلَى جُدُرَاتِ المَدِينَةِ، أَوْضَعَ
رَاحِلَتَهُ وَإِنْ كَانَ عَلَى دَابَّةٍ حَرَّكَهَا مِنْ حُبِّهَا ۔
When the Prophet ﷺ returned from a journey and looked at the walls of Madina he made his camel hasten, and if he was on a horse (Dabba. This word is used for either a horse or a mule, and although it is feminine it is used for either male or female) he urged it on through love of Medina.
[Sahih al Bukhari 1886]
Imam Ibn Hajar رحمہ اللہ said and explained this hadith
وَفِي الْحَدِيثِ دِلَالَةٌ عَلَى فَضْلِ الْمَدِينَةِ وَعَلَى مَشْرُوعِيَّة حب الوطن والحنين إِلَيْهِ.
Firstly this hadith proves the virtues of the city Madina secondary it proves that one can has love for his motherland and yearn for it.
[Fath ar Rabbani Sharah Sahih al Bukhari 3/621]
Imam ibn Battal رحمہ اللہ said:
وقد جبل الله النفوس على حب الأوطان والحنين إليها، وفعل ذلك عليه السلام، وفيه أكرم الأسوة
Indeed, Allah created the human with the soul who has love and passion for his country, this was the way of the Prophet ﷺ and he is the best example.
[Sharah Sahih Al Bukhari 4/555]
When Prophet ﷺ was forced to leave his motherland Makkah in the initial stage of Islam, he said:
مَا أَطْيَبَكِ مِنْ بَلَدٍ وَأَحَبَّكِ إِلَىَّ وَلَوْلاَ أَنَّ قَوْمِي أَخْرَجُونِي مِنْكِ مَا سَكَنْتُ غَيْرَكِ.
How sweet of a land you are and how dear you are to me, and if it were not that my people expelled me from you, I would not have lived in other than you.
[Sunan Tirmidhi 3925, Mishkat al Masabih 2725 Sahih by Imam Zubair Ali Zai]
A hadith, which is a lie attributed on Prophet on ﷺ commonly spread and shared occasionally that Prophet ﷺ said: حب الوطن من الْإِيمَان.
Loving one's country is part of the faith.
This hadith is not proven and this is not even a hadith.
Imam Suyuti رحمہ اللہ said حُبُّ الْوَطَنِ مِنَ الإِيمَانِ" لم أقف عليه.
I couldn't find this hadith [Al Durr Muntatharah 190]
Imam Al Albani رحمہ اللہ also said the hadith is (موضوع) fabricated
[As silah tus zaifa 1/110]
Contrary to that many of the people fall in ghulu (exaggeration) in nationalism they look down upon muslims or people from other countries and feel superiority over them just because of the nation they living in. This is not the teaching of Islam and Prophet ﷺ forbade us that no man is superior to other except the righteousness and piousness whether he is black, white, brown or Indian, American or Rich and poor all are same in the eyes of Allah and we also have no rights to deem anyone superior or inferior to us..
Nationalism is severe sin and ignorance in Islam.
The Arabic word, Al-'Asabiyyah (nationalism/tribalism), is derived linguistically from the word Al-'Asab, which means holding or encompassing. As for its meaning in Islamic terminology, it was defined by the Prophet, ﷺ, when he was asked: "Is it tribalism for a man to love his people?, and he said: ''No, nationalism is to support your people in an injust cause." [Ahmad] Moreover, Bint Waathilah Ibn Al-Asqa', may Allaah be pleased with her, narrated that she heard her father saying: "I said: 'O Prophet of Allaah, what is nationalism?’ He, ﷺ, replied: 'It is to help your people in an injust cause.’''
Ibn Taymiyah رحمہ اللہ said: The caution, here, is for a man to be prejudice toward his sect based on Jaahiliyyah cause only. Nonetheless, supporting one's nation or sect in a just cause without any transgression is something good, and its ruling could either be an obligation or something recommended according to the situation.'
[Islamweb Fatwa 92217]
In a beautiful hadith Prophet ﷺ said:
مَنْ خَرَجَ مِنَ الطَّاعَةِ وَفَارَقَ الْجَمَاعَةَ فَمَاتَ مَاتَ مِيتَةً جَاهِلِيَّةً وَمَنْ قَاتَلَ تَحْتَ رَايَةٍ عُمِّيَّةٍ يَغْضَبُ لِعَصَبَةٍ أَوْ يَدْعُو إِلَى عَصَبَةٍ أَوْ يَنْصُرُ عَصَبَةً فَقُتِلَ فَقِتْلَةٌ جَاهِلِيَّةٌ وَمَنْ خَرَجَ عَلَى أُمَّتِي يَضْرِبُ بَرَّهَا وَفَاجِرَهَا وَلاَ يَتَحَاشَ مِنْ مُؤْمِنِهَا وَلاَ يَفِي لِذِي عَهْدٍ عَهْدَهُ فَلَيْسَ مِنِّي وَلَسْتُ مِنْهُ
Whoever rejects lawful obedience to the leader and divides the community and dies in this state will have died upon ignorance. Whoever fights under the banner of one who is blind, raging for the sake of nationalism, or calling to nationalism, or supporting nationalism, and is killed in this state will have died upon ignorance. Whoever rebels against my Ummah, striking the righteous and wicked alike and sparing not even the believers and does not fulfill the pledge of security, then he has nothing to do with me and I have nothing to do with him.
[Sahih Muslim 1848]