The Prophet ﷺ said, "When one of you touches his private part with his hand, he must perform ablution."
أخبرنا عمران بن موسى قال حدثنا محمد بن سواء عن شعبة عن معمر عن الزهري عن عروة بن الزبير
أن النبي ﷺ قال إذا أفضى أحدكم بيده إلى فرجه فليتوضأ
Sahih. Previously mentioned, no. 163.