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:33:48

And do not obey the disbelievers and the hypocrites but do not harm them, and rely upon Allah. And sufficient is Allah as Disposer of affairs.  

And do not obey the disbelievers and the hypocrites, in ˹assenting to do˺ what contravenes your Law; and disregard, leave aside, their injuriousness — do not retaliate against them for it until you receive a command ˹from God˺ regarding ˹how to deal with˺ them. And put your trust in God, for He will suffice you, and God suffices as Guardian, One to Whom matters are entrusted.
القرآن:٣٣:٤٨

وَلَا تُطِعِ الْكَافِرِينَ وَالْمُنَافِقِينَ وَدَعْ أَذَاهُمْ وَتَوَكَّلْ عَلَى اللَّهِ ۚ وَكَفَىٰ بِاللَّهِ وَكِيلًا  

{ولا تطع الكافرين والمنافقين} فيما يخالف شريعتك {ودع} اترك {أذاهم} لا تجازهم عليه إلى أن تؤمر فيهم بأمر {وتوكل على الله} فهو كافيك {وكفى بالله وكيلا} مفوضا إليه.

See similar narrations below:

Collected by Qurʾān
quran:33:3

And rely upon Allah; and sufficient is Allah as Disposer of affairs.  

And put your trust in God, regarding this affair of yours; and God suffices as Guardian, to preserve you. And ˹the members of˺ his ˹the Prophet’s˺ community are subject to the same ˹admonitions˺ in all of the above.
القرآن:٣٣:٣

وَتَوَكَّلْ عَلَى اللَّهِ ۚ وَكَفَىٰ بِاللَّهِ وَكِيلًا  

{وتوكل على الله} في أمرك {وكفى بالله وكيلا} حافظا لك، وأمته تبع له في ذلك كله.