Mohammad Javdan, a professor at the University of Religions and Denominations, pointed to different viewpoints in this regard in a speech. Here is the summary of his remarks.
The emergence of Shiism is one of the most important issues that have been considered by Shias, Sunnis, and Orientalists. The authenticity of Shia religious identity is closely related to the issue of the origin of Shiism because the theories that have attributed the origin of Shiism to several decades after the Prophet (PBUH) actually seek to reject the authenticity of Shiism. Here, the origin of Shiism means the madhhab as a whole regardless of its branches such as Zaydi, Ismaili, and Twelver.
Shiism is the Alawite reading of Islam. Some believe that after the demise of the Prophet (PBUH), differences arose among Muslims and some people followed Imam Ali (AS) and his character and thought and considered Imam Ali’s understanding of revelation and Seerah as their criteria. However, the Alawite reading of Islam is no different than the prophetic reading and the pure religion.
On the other hand, "origin of Shiism" is not a correct term, because it presupposes that Shiism is a minority that has been separated from the body of Islam. This is while those who hold this view do not talk about the history of the emergence of other madhhabs.
The correct approach is to consider the historical rise of Shiism as a current. Some believe that Shiism was formed during the time of Prophet Muhammad (PBUH) and the period of revelation. There are some hadiths by the Prophet (PBUH) who used the word Shia; Ibn Hajar al-Haytami has quoted some of these hadiths. Mentioning verse 7 of Surah Al-Bayyina which reads “those who believe and do good, surely they are the -best of men”, some interpreters such as Fakhr al-Din al-Razi believe that “best of men” refers to Shias.
Some scholars have cited Hadith al-Manzila to talk about the emergence of Shiism at the time of the Prophet (PBUH). "To me, you are like Aaron to Moses, except for there is no prophet after me," says the Prophet (PBUH). According to this group’s argument, Shiism is based on Imamate and Prophet Muhammad (PBUH) announced this in Ghadir; what happened in Ghadir has been well documented in primary sources. The connection between Imamate and Prophethood and the inseparability of the two from each other (according to verse 124 of Surah Al-Baqarah), is another piece of evidence in proving the origin of Shiism in the time of the Prophet (PBUH).
Historians Abdullah Fayyaz and Abd Al-Aziz Duri have used the phrase “spiritual Shiism”. They believe that Shiism was formed in the time of the Prophet (PBUH) and a group of companions liked Ali's view of revelation and the Prophet (PBUH). Ali (AS) was a prominent figure among the companions. Shia scholars unanimously agree that Shiism originated in the time of the Prophet (PBUH). Shia scholars do not believe in separation of Shia from Islam and consider this madhab as Islam itself; so they do not even enter into the discussion of the origin of Shiism. Some scholars such as Wilferd Ferdinand Madelung believe that Prophet Muhammad (PBUH) laid the foundation for Ali (AS) to be his successor.