Al-Baqarah 2:216
كُتِبَ عَلَيْكُمُ ٱلْقِتَالُ وَهُوَ كُرْهٌ لَّكُمْ ۖ وَعَسَىٰٓ أَن تَكْرَهُوا۟ شَيْـًٔا وَهُوَ خَيْرٌ لَّكُمْ ۖ وَعَسَىٰٓ أَن تُحِبُّوا۟ شَيْـًٔا وَهُوَ شَرٌّ لَّكُمْ ۗ وَٱللَّهُ يَعْلَمُ وَأَنتُمْ لَا تَعْلَمُونَ
Kutiba AAalaykumu alqitalu wahuwakurhun lakum waAAasa an takrahoo shay-an wahuwa khayrunlakum waAAasa an tuhibboo shay-an wahuwa sharrunlakum wallahu yaAAlamu waantum lataAAlamoon
Battle has been enjoined upon you while it is hateful to you. But perhaps you hate a thing and it is good for you; and perhaps you love a thing and it is bad for you. And Allāh knows, while you know not.
Fighting is enjoined upon you, while it is hard on you. It could be that you dislike something, when it is good for you; and it could be that you like something when it is bad for you. Allah knows, and you do not know.