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:21:73

And We made them leaders guiding by Our command. And We inspired to them the doing of good deeds, establishment of prayer, and giving of zakah; and they were worshippers of Us.  

And We made them leaders (read a-immatan pronouncing both hamzas, or substituting the second one with a yā’), whose example of good ˹conduct˺ is followed, guiding, people, by Our command, to Our religion, and We inspired in them the performance of good deeds and the maintenance of prayers and the payment of alms, that is, ˹We inspired˺ that these ˹good deeds˺ be performed, ˹prayers˺ be maintained, and ˹alms˺ be payed by them and by their followers (the ˹final˺ hā’ of iqāma has been omitted to soften ˹the reading˺), and they used to worship Us.
القرآن:٢١:٧٣

وَجَعَلْنَاهُمْ أَئِمَّةً يَهْدُونَ بِأَمْرِنَا وَأَوْحَيْنَا إِلَيْهِمْ فِعْلَ الْخَيْرَاتِ وَإِقَامَ الصَّلَاةِ وَإِيتَاءَ الزَّكَاةِ ۖ وَكَانُوا لَنَا عَابِدِينَ  

{وجعلناهم أئمة} بتحقيق الهمزتين وإبدال الثانية ياء يقتدى بهم في الخير {يهدون} الناس {بأمرنا} إلى ديننا {وأوحينا إليهم فعل الخيرات وإقام الصلاة وإيتاء الزكاة} أي أن تفعل وتقام وتؤتى منهم ومن أتباعهم، وحذف هاء إقامة تخفيف {وكانوا لنا عابدين}.