Lady Umm Salamah, may Allah be pleased with her, says that the Prophet, peace and blessings be upon him, used to frequently recite this supplication before his passing: «سُبْحَانَكَ اللّٰهُمَّ وَبِحَمْدِكَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ» "O Allah! You are pure, and with Your praise, I seek Your forgiveness and turn to You in repentance." Lady Umm Salamah, may Allah be pleased with her, says, I said: O Messenger of Allah! I see you reciting this supplication often, so the Prophet, peace and blessings be upon him, said: "I have been given a command (because of which I recite this)." Then the Prophet, peace and blessings be upon him, recited: ﴿إِذَا جَاءَ نَصْرُ اللّٰهِ وَالْفَتْحُ﴾ "When the help of Allah comes and the victory as well."
Related hadith on this topic