What to do upon receiving good news

It is reported that when the Messenger of Allah ﷺ was delighted by something, or given glad tidings, he would fall down in prostration in gratitude to Allah the Exalted [Abu Dawud 2774; at-Tirmidhi 1578; Ibn Majah 1394; Sahih Sunan Ibn Majah 1/233].

This is the prostration of gratitude (sujud ash-shukr), which is not tied to the obligatory prayer. It may be performed anywhere — a single prostration suffices, in which one praises and thanks Allah.