Allah, the Exalted, says:
١٨ - باب في النهي عن البدع ومحدثات الأمور
Allah, the Exalted, says:
For that is Allāh, your Lord, the Truth. And what can be beyond truth except error? So how are you averted?
And He, the Exalted, says:
And there is no creature on [or within] the earth or bird that flies with its wings except [that they are] communities like you. We have not neglected in the Register1 a thing. Then unto their Lord they will be gathered.
And He, the Exalted, says:
O you who have believed, obey Allāh and obey the Messenger and those in authority among you. And if you disagree over anything, refer it to Allāh and the Messenger, if you should believe in Allāh and the Last Day. That is the best [way] and best in result.
That is, the Book and the Sunnah. And He, the Exalted, says:
And, [moreover], this is My path, which is straight, so follow it; and do not follow [other] ways, for you will be separated from His way. This has He instructed you that you may become righteous.
And He, the Exalted, says:
Say, [O Muḥammad], "If you should love Allāh, then follow me, [so] Allāh will love you and forgive you your sins. And Allāh is Forgiving and Merciful."
The verses on this subject are many and well known.
As for the hadiths, they are very many and well known, so we shall confine ourselves to a portion of them:
On the authority of ʿĀʾishah (may Allah be pleased with her), who said: The Messenger of Allah ﷺ said: "Whoever introduces into this affair of ours something that is not part of it, it is rejected." Agreed upon. In a version recorded by Muslim: "Whoever performs a deed that is not in accordance with our affair, it is rejected."
On the authority of Jābir (may Allah be pleased with him), who said: When the Messenger of Allah ﷺ delivered a sermon, his eyes would redden, his voice would rise, and his anger would intensify, as though he were one warning of an army, saying, "The enemy will fall upon you in the morning and in the evening." He would say: "I and the Hour have been sent like these two," joining his two fingers, the index and the middle. And he would say: "To proceed: the best of speech is the Book of Allah, and the best of guidance is the guidance of Muhammad ﷺ. The worst of affairs are those newly invented, and every innovation is misguidance." Then he would say: "I am closer to every believer than his own self. Whoever leaves wealth, it is for his family; and whoever leaves a debt or dependents in need, then it falls to me and is upon me." Narrated by Muslim. And on the authority of al-ʿIrbāḍ ibn Sāriyah (may Allah be pleased with him): his hadith already mentioned in the chapter on Adhering to the Sunnah.