From Sahih Muslim (Hadith 3404):
Sa'd b. Abi Waqqas (Allah be pleased with him) reported:The Messengger of Allah (ﷺ) rejected (the idea) of Uthman b. Muz'unliving in celibacy (saying): And if he (the Holy Prophet) had given me permission We would have got ourselves castrated
Reference: Muslim 3404