Sounds like you were trying to tighten the headset with the stem still clamped so it couldn't slide.
If not, remove the top cap and check your steerer tube height inside the stem or top spacer. The steerer must be below the outer stack by 1-3mm, so that the top cap can push down the stack without bottoming onto the steerer itself.
The two reasons above, tight stem, and top cap touching the steerer account for 99.9% of the cases of people forcing the top nut. If those are OK, you'll be fine, but if not, you'll break the next nut also.
BTW- remove the top cap and check the stem height before you go to the shop, so if you need a spacer you don't have to make a second trip.
__________________
FB
Chain-L site
An ounce of diagnosis is worth a pound of cure.
Just because I'm tired of arguing, doesn't mean you're right.
“One accurate measurement is worth a thousand expert opinions” - Adm Grace Murray Hopper - USN
WARNING, I'm from New York. Thin skinned people should maintain safe distance.