Whenever the Prophet ﷺ finished the prayer with the closing salam, he would say, "Allah, forgive me what I have done before and what I will do later, what I have concealed and what I have made public, what I have done in excess, and what You know better than I. You are the One who brings forward and You are the One who puts back. There is no god but You."
كان النبي ﷺ إذا سلم من الصلاة قال: اللهم اغفر لي ما قدمت وما أخرت، وما أسررت، وما أعلنت، وما أسرفت، وما أنت أعلم به مني، أنت المقدم، وأنت المؤخر، لا إله إلا أنت.
This portion was narrated by Abu Dawud (1509), who stated explicitly that he used to say this upon finishing the prayer. In Muslim (771, 201, 202), in a lengthy context, it reads, "He would say it between the tashahhud and the taslim," while in another narration it reads, "When he gave the taslim." So perhaps he sometimes said it between the tashahhud and the taslim, and other times after finishing the prayer. This was already discussed at length regarding the opening supplication, cited from Sahih Muslim, in the book of the travelers' prayer (771).