I've been able to use the F3+B command to show hitboxes before, but now in 1.18 it's not working. Not sure why. I've tested all the keys to make sure they're not broken, and other debug commands work fine (show chunk borders and advanced tooltip specifically are the ones I tested).
It seems to be working. I'm not sure why you can't.