Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:47:33

O you who have believed, obey Allah and obey the Messenger and do not invalidate your deeds.  

O you who believe! Obey God and obey the Messenger, and do not render your own works void, by ˹engaging in˺ acts of disobedience, for example.
القرآن:٤٧:٣٣

يَا أَيُّهَا الَّذِينَ آمَنُوا أَطِيعُوا اللَّهَ وَأَطِيعُوا الرَّسُولَ وَلَا تُبْطِلُوا أَعْمَالَكُمْ  

{يا أيها الذين آمنوا أطيعوا الله وأطيعوا الرسول ولا تبطلوا أعمالكم} بالمعاصي مثلا.