Sahih al-Bukhari 5988
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِنَّ الرَّحِمَ سُجْنَةٌ مِنَ الرَّحْمَنِ، فَقَالَ اللَّهُ مَنْ وَصَلَكِ وَصَلْتُهُ، وَمَنْ قَطَعَكِ قَطَعْتُهُ "
Narrated Abu Huraira:
The Prophet (ﷺ) said, "The word 'Ar-Rahm (womb) derives its name from Ar-Rahman (i.e., one of the names of Allah) and Allah said: 'I will keep good relation with the one who will keep good relation with you, (womb i.e. Kith and Kin) and sever the relation with him who will sever the relation with you, (womb, i.e. Kith and Kin).
Full reference and source
Sahih al-Bukhari 5988 In-book : Book 78, Hadith 19 USC-MSA web (English) : Vol. 8, Book 73, Hadith 17 (deprecated)
View source on Sunnah.com (opens in a new tab)