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:16:128

Indeed, Allah is with those who fear Him and those who are doers of good.  

Truly God is with those who fear, ˹falling into˺ unbelief and ˹committing˺ acts of disobedience, and those who are virtuous, by way of obedience and patience, ˹granting them˺ assistance and victory. Meccan, except for verses 26, 33 ˹or 32˺, 57, and from 73 to the end of 80, which are Medinese; it consists of 111 verses and was revealed after ˹sūrat˺ al-Qasas.
القرآن:١٦:١٢٨

إِنَّ اللَّهَ مَعَ الَّذِينَ اتَّقَوْا وَالَّذِينَ هُمْ مُحْسِنُونَ  

{إن الله مع الذين اتقوا} الكفر والمعاصي {والذين هم محسنون} بالطاعة والصبر، بالعون والنصر.