like the steering was locked.
I know exactly what you mean - scary stuff when not expecting it.
If your bike is in a condition similar to mine then it probably has the original factory grease which will have/be going hard.
At first the steering gets a bit stiff and it makes you think you are having an unco riding day. Then it starts to jam at certain angles.
Service those bearings is my advice. There are some guides on here for reference. Be aware the centre Allen bolt on top of the triple clamp will need a good quality strong and long wrench and possibly a breaker bar or extension of some sort to 'crack' it - it's handy to have someone to hold the bike at this point. Other than that the job is pretty straight forward and takes and hour or two muddling around in the garage.
In the Interim/ and or for diagnosis purposes there is a little hole usually with a flimsy dust cap in the head tube behind the headlight - squirt some wd40 or similar loosening oil in. The steering should free up considerably and stop locking in certain positions.
That should get you by for a week or two if you don't have the time immediately but test it at low speeds in a safe spot first.