There are two main viewpoints concerning the issue of Imamate, The first is that of the Sunnis, who hold that the Prophet(saws), may God’s peace and blessing be on him and his descendants, did not introduce any successor and say that the community had to choose the Prophet’s successor and leader of the Muslims.
https://onneshghi.blogspot.com/2018/12/imamate-and-infallibility-of-imams-in.html