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:8:63

And brought together their hearts. If you had spent all that is in the earth, you could not have brought their hearts together; but Allah brought them together. Indeed, He is Exalted in Might and Wise.  

and reconciled, brought together, their hearts, after old feuds ˹had divided them˺. Had you expended all that is in the earth, you could not have reconciled their hearts, but God reconciled their hearts, through His power. Truly He is Mighty, His way prevailing, Wise, nothing being beyond ˹the scope of˺ His wisdom.
القرآن:٨:٦٣

وَأَلَّفَ بَيْنَ قُلُوبِهِمْ ۚ لَوْ أَنْفَقْتَ مَا فِي الْأَرْضِ جَمِيعًا مَا أَلَّفْتَ بَيْنَ قُلُوبِهِمْ وَلَٰكِنَّ اللَّهَ أَلَّفَ بَيْنَهُمْ ۚ إِنَّهُ عَزِيزٌ حَكِيمٌ  

{وألَّف} جمع {بين قلوبهم} بعد الإحن {لو أنفقت ما في الأرض جميعا ما ألَّفت بين قلوبهم ولكنَّ الله ألف بينهم} بقدرته {إنه عزيز} غالب على أمره {حكيم} لا يخرج شيء عن حكمته.