The Messenger of Allah ﷺ forbade Uthman bin Mazun from celibacy. Had he permitted it, we would have castrated ourselves.
حدثنا الحسن بن علي الخلال وغير واحد قالوا أخبرنا عبد الرزاق أخبرنا معمر عن الزهري عن سعيد بن المسيب
رد رسول الله ﷺ على عثمان بن مظعون التبتل ولو أذن له لاختصينا
Agreed upon [by Bukhari and Muslim]. Bukhari narrated it in the Book of Marriage, Chapter on What is Disliked Regarding Celibacy and Castration, hadith 5073, from the hadith of Zuhri, transmitted through him. Muslim narrated it, hadith 1402, from the hadith of Mamar, transmitted through him.