Islamic Ruling on Notifying Imam of a Mistake in Prayer
It is recommended for a follower to alert the Imam of a minor mistake in prayer using specific gestures, with the intention of dhikr.

According to the hadith of Sahal ibn Sa’d (RA), the Prophet ﷺ said that if a mistake occurs in prayer, men should say Subhan Allah to alert the Imam, and women should tap the inner part of their right palm on the back of the left palm.
Islamic scholars explain that for men, saying Subhan Allah is recommended to notify the Imam of a minor mistake, while for women, tapping the palms is the proper method. It is important that the intention is to remember Allah (dhikr) along with alerting the Imam. If the intention is only to notify the Imam without dhikr, the follower’s prayer becomes invalid.
Al-Khatib al-Sharbini adds that this method should be done carefully to avoid mistakes, and the intention of dhikr must be clear, otherwise the prayer of the follower will be void.