Sure Al-Mujaadila

58:3

وَٱلَّذِينَ يُظَٰهِرُونَ مِن نِّسَآئِهِمْ ثُمَّ يَعُودُونَ لِمَا قَالُوا۟ فَتَحْرِيرُ رَقَبَةٍۢ مِّن قَبْلِ أَن يَتَمَآسَّا ۚ ذَٰلِكُمْ تُوعَظُونَ بِهِۦ ۚ وَٱللَّهُ بِمَا تَعْمَلُونَ خَبِيرٌۭ

Diejenigen, die sich von ihren Frauen durch den Rückenschwur trennen und hierauf dann doch zu dem zurückkehren, was sie gesagt haben, (sollen) einen Sklaven befreien, bevor sie beide einander berühren. Damit werdet ihr ja ermahnt. Und Allah ist dessen, was ihr tut, Kundig.

Tafsir 58:3

It is necessary upon those who utter this disgusting statement and then intend to have sexual intercourse with the wife they did Ẓihār to, that they make amends by freeing a slave before they have intercourse. This aforementioned ruling you have been commanded to carry out is a reprimand for you for the Ẓihār. And Allah is aware of your actions; none of your actions are hidden from Him.