اشهد أن لا اله الا الله محمد رسول الله
I bear witness that there is no god what day of worship expect Allah and muhammed is the last and final prophet of god. May God peace and blessings of god be upon the prophet and his family and friends and my Allah protect the nation of the prophet peace and blessings him.
We have to come to a understanding about the Shias first, according to the scholars of Islam, they aren’t part of Islam thus calling yourself shia isn’t permissible. It’s forbidden for a Muslim to call themself a Shias.
Sheikh ibn hazm said “Shias aren’t not even Muslims themselves” he said this when he was debating a Christian.
Imam malik and he’s student both affirm that Shias aren’t Muslim.
Sheikh Ibn Taymiya takfired the Shias and he also said they aren’t Muslims.
So a person who calls himself a Shia isn’t Muslim and this is forbidden.
As for Sunni part. We know that sunni Islam isn’t a sect anyone who says it is, is wrong.
Sunni is a person who follows the sunnah of the prophet. And according to the hadith
Of صحيح ابن حبان the prophet صلى الله عليه وسلم said:
عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ مَنْ رَغِبَ عَنْ سُنَّتِي فَلَيْسَ مِنِّي
“Whoever does not follow my Sunnah is not a part of me.” So just by this we know that we can call our selves Sunnis. Because it just means to follow the sunnah of the prophet.
Source: صحيح ابن حبان الرقم 317
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
There is no shame in declaring oneself to be a follower of the salaf, belonging to it and feeling proud of it; rather that must be accepted from him, according to scholarly consensus. The madhhab of the salaf cannot be anything but true. If a person adheres to it inwardly and outwardly, then he is like the believer who is following truth inwardly and outwardly. If he adheres to it outwardly only, and not inwardly, then he is like the hypocrite; he is to be accepted as he appears to be, and what is hidden in his heart is left to Allah (to judge), because we are not instructed to check on what is in people’s hearts.
Source: مجموع الفتاوى 1/149
You can call yourself sunni,Muslim,salafi,ahulu sunnah,ahlu hadith all of these things that show that you are a believer you can call yourself this. This is permissible according to the opinion of all scholars of Islam. Sheikh Al-Albani Shaykh al-Islam Ibn Taymiyah and May more affirm this belife.
Inshallah I hope this helped.