An-Nawawy's Forty Hadiths: (5) Worship and Heresy
On the authority of the mother of the faithful, Aisha (may Allah be pleased with her), who said, "The Messenger of Allah (ﷺ) said, 'He who innovates something in this matter of ours (i.e. Islam) that is not of it will have it rejected (by Allah).'" [Bukhari & Muslim] In another version in Sahih Muslim, it reads, “He who does an act which we have not commanded, will have it rejected (by Allah).”