The Prophet ﷺ forbade a man from touching his private part with his right hand.
حدثنا محمد بن أبي عمر المكي حدثنا سفيان بن عيينة عن معمر عن يحيى بن أبي كثير
أن النبي ﷺ نهى أن يمس الرجل ذكره بيمينه
Agreed upon. Bukhari transmitted it in the Book of Wudu, chapter on the prohibition of cleaning oneself with the right hand, no. 153, and Muslim in the Book of Purification, chapter on the prohibition of cleaning oneself with the right hand, no. 267, from the hadith of Yahya bin Abu Kathir with the same chain.On this subject there are also narrations from Ayesha [Bukhari: 168 and elsewhere, and Muslim, no. 268, and Abu Dawud, no. 33, and others], Salman [coming up, no. 16], Abu Hurairah [Abu Dawud, no. 8, and Ibn Majah, no. 312], and Sahl bin Hunayf [we did not find it].He also has another hadith on the prohibition of facing the qibla while relieving oneself or urinating, transmitted by Ahmad, 3/487.