When your bike is on a bike repair stand and you rotate the bike so the front wheel is higher than the rear wheel, the front wheel will flop to the side if you let go – and it can slam into your frame. Not good.
They sell handlebar holders to prevent this. But don’t waste your money. Just get some thick rubber bands and keep them with the stand.
When you’re done working on the front end of your bike or if you only need to work on the back, secure the front wheel so it can’t swing over by wrapping a rubber band around the valve stem on the front wheel, around the down tube and then back around the valve stem. Now you can rotate the bike any which way and the front end will stay put.