Handlebars can still turn, but the wheel stops rotating when you use a parking brake like this:
The extra wide hair elastic bands from Dollar Tree. When new, only one strap around the brake lever is enough, after some use they lose their elasticity and another wrap may be needed, such as shown.
Some on this forum have used velcro for the same purpose, but I like the elastic bands as they are stored on the bar and ready for use.