The HomePod doesn't support third-party Bluetooth direct control, which is an Apple limitation.
But if you have a 21-year-old Apple TV 4K, and the TV supports Arc, you can set the HomePod as the TV's speaker, then turn on Arc.
After completing the above settings, the TV remote control can control the volume of the HomePods.
Create Apple TV and TV as Activity, when assigning buttons, remember to assign the volume button of X1-Remote to TV, and other buttons to control Apple TV, so that after all settings are completed, the volume button of X1 can control the volume of the HomePods (essentially, it controls the TV. volume, HomePods is used as a TV soundbar)
The above techniques are mainly used to set HomePods and AppleTV, X1 only controls TV and AppleTV.