Ah, I presume you mean you looked up thank-you, which is an existing noun but not the same thing at all as the common idiom thank you.
Merriam-Webster tells us:
Full Definition of THANK-YOU
: a polite expression of one's gratitude
Origin of THANK-YOU
from the phrase thank you used in expressing gratitude
First Known Use: 1792
Now, the phrase “thank you” is indeed always written without a hyphen.
But when we transform phrases into nouns, we use (often) hyphens to indicate that those words belong together as a set phrase, and together they become a noun:
After the wedding they sent thank-yous to the guests.
As with many nouns, we can use thank-you attributively ("as an adjective") to modify another noun:
I sent her a thank-you note.
Thank you contains a verb(thank) linked to an object(you). This is how we normally thank people.
For ex: "[I/we] thank you for being here."
Like many other phrases, this commonly used phrase was turned into a single hyphenated word, 'thank-you'. It is considered as the noun/adjective form of 'thank you'.
For ex: I sent him a thank-you card. He gave a big thank-you to all of us.
Eventually, the hyphen was removed and the hyphenated word became a single word, 'thankyou'. Some people still retain that hyphen, but some others choose to omit it(for the noun/adjective form).
You can have a look at this article: thank-you