Surah Al-Maaida

5:49

وَأَنِ ٱحْكُم بَيْنَهُم بِمَآ أَنزَلَ ٱللَّهُ وَلَا تَتَّبِعْ أَهْوَآءَهُمْ وَٱحْذَرْهُمْ أَن يَفْتِنُوكَ عَنۢ بَعْضِ مَآ أَنزَلَ ٱللَّهُ إِلَيْكَ ۖ فَإِن تَوَلَّوْا۟ فَٱعْلَمْ أَنَّمَا يُرِيدُ ٱللَّهُ أَن يُصِيبَهُم بِبَعْضِ ذُنُوبِهِمْ ۗ وَإِنَّ كَثِيرًۭا مِّنَ ٱلنَّاسِ لَفَٰسِقُونَ

And judge, [O Muhammad], between them by what Allah has revealed and do not follow their inclinations and beware of them, lest they tempt you away from some of what Allah has revealed to you. And if they turn away - then know that Allah only intends to afflict them with some of their [own] sins. And indeed, many among the people are defiantly disobedient.

Tafsir 5:49

Judge between them, O Messenger, in accordance with what Allah has revealed to you! Do not follow their opinions that arise from following their desires. Be careful that they do not mislead you from some of what Allah has revealed to you. They will leave no stone unturned in an attempt to do just that. If they turn away from accepting judgement in accordance with what Allah has sent down to you, then know that Allah only intends to punish them for some of their sins in this world. In the Afterlife, He will punish them for all of their sins. There are many people who do not follow Allah’s laws.