Most Sonos soundbars, at least the ‘newer’ ones, work via HDMI-ARC, which means the remote doesn’t connect at all to the Sonos device, only the TV set. It’s the TV set’s responsibility, via CEC-ARC, to send volume commands to the Sonos.
So it may be more germane to ask which Sonos soundbar do you have, as well as the question above.
Your forum handle suggests a PLAYBAR, which does suggest an IR connection to the Sonos soundbar, but many newer remotes tend to connect, when they can, to a TV via RF. So you’d need to change the remote to IR connection (see the remote’s manual) and then pair it via the link above…although if you set it to IR anyway, to work with the TV, it may just start working with the Sonos as well, since the PLAYBAR responds to IR commands that are normally sent to the TV.