At the beginning of Islam, intercourse did not necessitate ghusl unless semen was emitted, then that was abrogated and ghusl becomes obligatory for intercourse Sahih Muslim 347 a
Arabic hadith text
وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، وَعَبْدُ بْنُ حُمَيْدٍ، قَالاَ حَدَّثَنَا عَبْدُ الصَّمَدِ بْنُ عَبْدِ الْوَارِثِ، ح وَحَدَّثَنَا عَبْدُ الْوَارِثِ بْنُ عَبْدِ الصَّمَدِ، - وَاللَّفْظُ لَهُ - حَدَّثَنِي أَبِي، عَنْ جَدِّي، عَنِ الْحُسَيْنِ بْنِ ذَكْوَانَ، عَنْ يَحْيَى بْنِ أَبِي كَثِيرٍ، أَخْبَرَنِي أَبُو سَلَمَةَ، أَنَّ عَطَاءَ بْنَ يَسَارٍ، أَخْبَرَهُ أَنَّ زَيْدَ بْنَ خَالِدٍ الْجُهَنِيَّ أَخْبَرَهُ أَنَّهُ، سَأَلَ عُثْمَانَ بْنَ عَفَّانَ قَالَ قُلْتُ أَرَأَيْتَ إِذَا جَامَعَ الرَّجُلُ امْرَأَتَهُ وَلَمْ يُمْنِ قَالَ عُثْمَانُ "يَتَوَضَّأُ كَمَا يَتَوَضَّأُ لِلصَّلاَةِ وَيَغْسِلُ ذَكَرَهُ " . قَالَ عُثْمَانُ سَمِعْتُهُ مِنْ رَسُولِ اللَّهِ صلى الله عليه وسلم .
Translation
Zaid b. Khalid al-Jubani reported that he askad Uthman b. 'Affan
What is your opinion about the man who has sexual intercourse with his wife, but does not experience orgasm? Uthman said: He should perform ablution as he does for prayer, and wash his organ. 'Uthmin also said: I have heard it from the Messenger of Allah (ﷺ).