The USB HID standard
does support volume control knobs. Code 0xe0 "Volume" (LC) in the "Consumer" usage page 0x0c.
However, the question is what your operating system supports ... and AFAIK no operating system fully supports the entire HID standard.
It would most likely have to be a
relative control, however - which I think is best anyway because otherwise you would have to make it motorised to have it update itself to volume changes done other ways in the operating system -- and I am not even sure that motorised volume controls are even supported by any operating system.
I think the best way to do it would be with a rotary encoder that you poll every millisecond. That speed should be fast enough for anything you can turn by hand.
Rotary encoders are relative, where as potentiometers are absolute.
Then.. you would have to implement this in QMK. From what I can glance, QMK does not seem to have support for a volume knob, so you would have to write it all yourself.
It does seem to support volume up/down keys but not a direct relative volume knob.
Edit:
I found an Arduino project for a volume knob that uses a rotary encoder and sends key presses.
Maybe you could interpret the rotary encoder as two keys - and you would get it debounced at the same time.