Awhile and A while

Awhile – adverb referencing time, stay awhile.

A while – object of a preposition, note using “for” preceding “a while” for your tip-off.