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:24:51

The only statement of the ˹true˺ believers when they are called to Allah and His Messenger to judge between them is that they say, "We hear and we obey." And those are the successful.  

All that the believers say, when they are summoned to God and His Messenger, that he may judge between them, is that they say, in other words, the saying that befits them is ˹to say˺: ‘We hear and we obey’, by responding ˹to the summons˺. And those, then, are the successful, the ones who will be saved.
القرآن:٢٤:٥١

إِنَّمَا كَانَ قَوْلَ الْمُؤْمِنِينَ إِذَا دُعُوا إِلَى اللَّهِ وَرَسُولِهِ لِيَحْكُمَ بَيْنَهُمْ أَنْ يَقُولُوا سَمِعْنَا وَأَطَعْنَا ۚ وَأُولَٰئِكَ هُمُ الْمُفْلِحُونَ  

{إنما كان قول المؤمنين إذا دعوا إلى الله ورسوله ليحكم بينهم} فالقول اللائق بهم {أن يقولوا سمعنا وأطعنا} بالإجابة {وأولئك} حينئذ {هم المفلحون} الناجون.