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:6:107

But if Allah had willed, they would not have associated. And We have not appointed you over them as a guardian, nor are you a manager over them.  

Had God willed, they would not have been idolaters; and We have not set you as a keeper over them, a watcher, so that you might then requite them for their deeds; nor are you a guardian over them, so that you might ˹be able to˺ coerce them to faith — this was ˹revealed˺ before the command to fight ˹them˺.
القرآن:٦:١٠٧

وَلَوْ شَاءَ اللَّهُ مَا أَشْرَكُوا ۗ وَمَا جَعَلْنَاكَ عَلَيْهِمْ حَفِيظًا ۖ وَمَا أَنْتَ عَلَيْهِمْ بِوَكِيلٍ  

{ولو شاء الله ما أشركوا وما جعلناك عليهم حفيظا} رقيبا فتجازيهم بأعمالهم {وما أنت عليهم بوكيل} فتجبرهم على الإيمان وهذا قبل الأمر بالقتال.