First your new question has a smooth transition to your last one therefore some of my quotes may more apply to your earlier question and some may apply to both and some may more likely be a good answer on your actual question.
I think there's also a smooth transition to supplication, as thanking Allah or doing suplication are both a kind of remembrance of Allah.
Secondly note that thanking can be expressed by many things for example the mother of Mariam () expressed her thankfulness for the birth of her -female- child by seeking refuge for her (daughter) in Allah from the Shaytan:
But when she delivered her, she said, "My Lord, I have delivered a female." And Allah was most knowing of what she delivered, "And the male is not like the female. And I have named her Mary, and I seek refuge for her in You and [for] her descendants from Satan, the expelled [from the mercy of Allah ]." (3:36)
One could say that she thanked Allah for her child and asked Allah to protect it from any harm, as he protected her during the pregnancy.
The Qur'an also invites us to be thankful for having parents (etc.) in (31:14) and being born (16:78).
Allah () also asked our Prophet () and his companions () to be thankful after the battle of badr:
And already had Allah given you victory at [the battle of] Badr while you were few in number. Then fear Allah ; perhaps you will be grateful. (3:123)
One could say the same about the battle of Hunain (9:25-27).
Thankfulness can be expressed by a prostration or maybe generally by a worship or good deed like in the story of Dawod() (38:21-25) (this could also be used as an example for Case of a Prophet / Revered Person in the Quran that says Alhamdullillah?)
One could here add parts of the story of Yusuf () who has been saved from the well, then saved (or guided by Allah) from committing the sin of zina and therefore preferred to be arrested instead (And asked Allah to protect him from zina by imprisonment (12:33) and after all Allah brought him together with his family and they expressed their thankfulness in (12:100-101) because of Allah's protection and gifts over them.
One could also add Ayyub ().
And [mention] Job, when he called to his Lord, "Indeed, adversity has touched me, and you are the Most Merciful of the merciful." (21:83)
And Nuh (23:28)
Some other possible evidences is the reaction of Shu'aib and those who believed him who sought refuge by Allah when the eminent ones wanted to expulse them (7:85-93).
And Musa () who fled from Pharaoh to Madyan in first place asked Allah to forgive him for having kiled a soul, then refused to assist criminals (Pharaoh), the to save him (from Pharaoh), then to guide him (once in Madyan) then after witnessing what happened at the well he expressed his need of Allah's gift (this final supplication is recommended for those people who seek marriage) (28:14-24).