Often a verb form will be two words: “Line up the cans on the fence,” “I have to make up my face.” While the corresponding noun form is one word: “We have a great lineup of entertainers this year,” “Some wear too much makeup.” Adjective forms are often hyphenated, like “long-term relationship.” But some eventually fuse together, hence “longtime” and “everyday.” Only dictionary-makers get to decide when compounds become single words.
But these are rough guidelines at best. If you need to get it right, you have to check the dictionary. Better yet, check two or three dictionaries. There you’ll see that this stuff is far from scientific. For example, “Webster’s New World College Dictionary” says there’s a hyphen in the adjective “absent-minded.” “Merriam-Webster” says it’s just one word, “absentminded.” Some dictionaries say “under way” is always two words, while others say it’s always one word, “underway.”
Then there are terms like “awhile” versus “a while.” Both are correct, depending on how you use them. The one-word form is an adverb, “I hope you can stay awhile.” But the two-word form is basically a noun, often the object of the preposition “for”: “I hope you can stay for a while.”