Thank you is a phrase used to show one's gratitude towards a good deed. It has been used for a long time, since the 1400s. People often say "you're welcome" in response to the appreciation of gratitude.
Etymology
The phrase "thank you" derives from "think".[1][2]