I would definitely suggest NOT attempting to use that muzzle device on a 9mm barrel, even if a 9mm will pass through it, I’m sure someone with much more knowledge about the specific science involved will chime in, but from my understanding there are specific tolerances involved when dealing with a muzzle device.
In most cases you can certainly use a muzzle device designed for a large caliber with a smaller caliber, such as using a 7.62 brake on a 5.56 barrel, provided the thread pitch is the same, but in “most” cases, a muzzle device designed for use on a 7.62 barrel will have a different thread pitch than one most commonly found on a .223/5.56 barrel, but you can’t rely totally on the thread pitch to keep yourself out of trouble, someone with a barrel threading kit can make anything work.
With that said, from my understanding, the most common thread pitch on a .223/5.56 barrel will be 1/2x28 and 1/2x36 on a 9mm barrel, so right out of the gate you will need to see if that muzzle device will even mount on the barrel, if by chance it does indeed match the thread pitch on the barrel, you’ll want to be extremely careful when test firing the firearm because if the science isn’t exactly right, bad stuff WILL happen, I’ve seen everything from the bullet being caught by the muzzle brake when a 9mm was shot into a 5.56 brake to the barrel literally peeling open like a banana peel when someone shot a .308 rifle with a 5.56 brake installed on the barrel.
My suggestion is to not be a cheap ass and buy the proper muzzle device for the caliber you are shooting.
Edit: that last sentence was not intended as a slight, believe me, I am CHEAP and will go out of my way to save a buck if I can, but I’ve been fortunate enough to see plenty of instances where red neck engineering ended up going really, really poorly, and in more than once instance, I had considered doing the exact same thing someone with a blown up gun had attempted lmao!