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 b

Arabic hadith text
وَحَدَّثَنَا عَبْدُ الْوَارِثِ بْنُ عَبْدِ الصَّمَدِ، حَدَّثَنِي أَبِي، عَنْ جَدِّي، عَنِ الْحُسَيْنِ، قَالَ يَحْيَى وَأَخْبَرَنِي أَبُو سَلَمَةَ، أَنَّ عُرْوَةَ بْنَ الزُّبَيْرِ، أَخْبَرَهُ أَنَّ أَبَا أَيُّوبَ أَخْبَرَهُ أَنَّهُ، سَمِعَ ذَلِكَ، مِنْ رَسُولِ اللَّهِ صلى الله عليه وسلم
Translation

Abu Ayyub reported that he had heard like this from the Messenger of Allah (ﷺ).