" مَنْ شَكَّ فِي صَلاَتِهِ فَلْيَسْجُدْ سَجْدَتَيْنِ بَعْدَ مَا يُسَلِّمُ "
It was narrated that Abdullah bin Ja'far said: "The Messenger of Allah (ﷺ) said: 'Whoever has doubt during his prayer, let him prostrate twice after he has said the taslim'".