It was narrated from ‘Aishah that the Prophet (ﷺ) said:
“When anyone of you performs prayer and commits Hadath, (passing wind) let him take hold of his nose, then leave.” Another chain with similar wording.