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:10:41

And if they deny you, ˹O Muhammad˺, then say, "For me are my deeds, and for you are your deeds. You are disassociated from what I do, and I am disassociated from what you do."  

If they deny you, then say, to them: ‘Unto me is my work, and to you your work, that is, for each there will be a ˹due˺ requital of his deeds; you are innocent of what I do, and I am innocent of what you do’: this was abrogated by the ‘sword’ verse ˹Q. 9:5˺.
القرآن:١٠:٤١

وَإِنْ كَذَّبُوكَ فَقُلْ لِي عَمَلِي وَلَكُمْ عَمَلُكُمْ ۖ أَنْتُمْ بَرِيئُونَ مِمَّا أَعْمَلُ وَأَنَا بَرِيءٌ مِمَّا تَعْمَلُونَ  

{وإن كذبوك فقل} لهم {لي عملي ولكم عملكم} أي لكلٍّ جزاء عمله {أنتم بريئون مما أعمل وأنا بريء مما تعلمون} وهذا منسوخ بآية السيف.