Sure Al-Maaida

5:108

ذَٰلِكَ أَدْنَىٰٓ أَن يَأْتُوا۟ بِٱلشَّهَٰدَةِ عَلَىٰ وَجْهِهَآ أَوْ يَخَافُوٓا۟ أَن تُرَدَّ أَيْمَٰنٌۢ بَعْدَ أَيْمَٰنِهِمْ ۗ وَٱتَّقُوا۟ ٱللَّهَ وَٱسْمَعُوا۟ ۗ وَٱللَّهُ لَا يَهْدِى ٱلْقَوْمَ ٱلْفَٰسِقِينَ

Das ist eher geeignet, daß sie das Zeugnis, wie es sein soll, ablegen oder sie befürchten (müssen), daß nach ihren Eiden wieder (andere) Eide (geschworen) werden. Und fürchtet Allah und hört! Allah leitet das Volk der Frevler nicht recht.

Tafsir 5:108

These various oaths to be taken by the witnesses after the prayer (when you doubt their testimony) and the rejection of their testimony increases the likelihood that they will testify in the way required by the sacred law, without them distorting the facts deceitfully. Witnesses are more likely to give true testimony for fear that they will be disgraced if the heirs give conflicting testimony. Be mindful of Allah by not lying or being deceitful in your testimony and oath. Listen to what you are instructed to do and obey. Allah does not guide those who go against Him.