The barspin hop is a fundamental trick in BMX, it’s common in most types of riding. If you ride street, there’s no better place to learn how to spin the bars than on some flat ground.
You can be rolling relatively slowly before you start to hop. Something around walking pace should be fast enough to get started.