Now this one is confusing for a lot of people. “Awhile” as one word basically means “For a while” with two words…so if someone writes “for awhile” they basically write “for for a while” which is confusing and incorrect. This makes it hard. If there is a “for” generally the “a while” will be two words.
It had been awhile since she went to the gym, but she really needed to start working out again.
A while had passed since she had gone to the gym.
For a while she thought she was good with just walking to and from work
Every once in a while she would go for a longer walk to get ice cream.