RM-Z250 Handlebar Bolt Question

Was riding on trails with a buddy and handlebars seemed loose, thought nothing of it but after a while my left handlebar side was almost completely loose. I went straight home and by that time it was completely off so only one side was in the clamp, I believe the bolt was somehow knocked out while riding. Looking to find a replacement but unsure of the size of the bolt or where to find a replacement.
And usually in their description, they will tell you the bolt size and length which can be used to source the bolt locally if there's a well stocked hardware store close by.
Local bike shop. Typically most bikes are the same size. You can also pull the OEM parts list up on RockyMountain's webite. Just plug in you Make, year and model.