Level 15

Education

Here's the bottom line:
Any education assistance monies that you receive in a tax year from any source (employer, 529 plan, scholarship, etc.), that is not spent on *qualified* education expenses in that same tax year, is taxable income to you. It doesn't matter where that money comes from.
Now some clarification of "qualified" expenses is called for here, only because there are 529 funds involved.
The only *QUALIFIED* education expenses are tuition, books and lab feels. That's it. There are no exceptions. But with 529 funds, in addition to the three qualified expenses they can also be used for the unqualified expense of room and board *PROVIDED* that room and board is paid *in direct support* of the education.
Now in your case I doubt you would qualify to claim the room and board expense against the 529 funds, as I am of the impression that where you lived in 2018 would not have changed had you not been in school. Generally, the only students that qualify for the room and board expense against 529 funds, are undergraduate students that qualify as a dependent on their parent's tax return. Since you worked in 2018 (full time I presume?) I am making the assumption that there is no way possible your parents would or could qualify to claim you as a dependent. Now I can get "into" that if you like. But that's kinda deviating to far from your root question.