Sure Al-Maaida

5:49

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

Und so richte zwischen ihnen nach dem, was Allah (als Offenbarung) herabgesandt hat, und folge nicht ihren Neigungen, sondern sieh dich vor ihnen vor, daß sie dich nicht der Versuchung aussetzen (abzuweichen) von einem Teil dessen, was Allah zu dir (als Offenbarung) herabgesandt hat! Doch wenn sie sich abkehren, so wisse, daß Allah sie für einen Teil ihrer Sünden treffen will. Viele von den Menschen sind fürwahr Frevler.

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.