Then learnt Adam from his Lord words of inspiration, and his Lord Turned towards him; for He is Oft-Returning, Most Merciful.
Adam made a mistake despite he was a chosen prophet. He noticed his mistake and asked forgiveness of Allah. Allah accepted his repentance. Hence, in the hailing of Beniadem, such things and beauties are reminded. (Creation of the Universe and Man according to the Quran, pg. 35)
For details see the following post: Dua Kumayl
In the verse 7:23 we read: “Both of them said, Our Lord! We have done injustice to our souls, and if you do not protect us (against the consequences of our faults) and do not have mercy on us, we shall surely be of the losers.” These were words of repentance asking for forgiveness. The words of repentance are for all human beings in similar situations. [Exegesis of the Holy Quran, pg. 354]
God granted him mercy and promised to give guidance to his seed. He established man on earth wherein he would rule by power of will and reason as God’s viceroy (The Quran: An Ateempt at a Modern Reading, pg. 76)
According to Muhammad Amin A. Samad,
‘This statement is the reminiscent of Allah’s promise to Adam and Eve after accepting their repentance for eating the forbidden fruit. He said:
“(For although) We did say, ‘Down with you all from this (state),’ there shall, none the less, most certainly come unto you guidance from Me: and those who follow My guidance need have no fear, and neither shall they grieve; but those who are bent on denying the truth and giving the lie to Our messages ‐ they are destined for the fire, and therein shall they abide.”
(Qur’ān 2: 38‐39, Asad’s translation)
This verse indicates the continuation of Allah’s guidance to mankind through His messengers since the time of Adam till the Last Day. This message reached its culmination in Prophet Muhammad (s.a.w.) who was the last messenger and was sent to the whole of mankind.
(From ‘A Collection of Islamic Writings’, Muhammad Amin A. Samad, pg. 21-22)
Amin A. Samad, Muhammad (2009). From ‘A Collection of Islamic Writings’. pg. 21-22. http://www.islamicweblibrary.com/wp-content/uploads/2020/05/A_COLLECTION_OF_ISLAMIC_WRITINGS.pdf
Mahmoud, Mostafa (2000). The Quran: An Attempt at a Modern Reading. (p. 76). http://www.islamicweblibrary.com/wp-content/uploads/2019/03/English_THE_QURAN_An_Attempt_at_a_Modern_Reading.pdf
NOORUDDÎN ,ALLÂMAH. (2015). Exegesis of The Holy Qur’ân Commentary and Reflections. (p. 342, 349, 352, 354, 355). http://www.islamicweblibrary.com/wp-content/uploads/2020/10/Exegesis-of-the-Holy-Quran-Commentary-and-Reflections.pdf
Yılmaz, Hakkı. CREATION OF THE UNIVERSE AND MAN ACCORDING TO THE QUR’AN (pp. 31-35). Kindle Edition.