Anas bin Malik narrated that the Prophet (ﷺ) would say:
"O Allah, I seek refuge in You from a prayer that is of no benefit."