What is you model remote? Identify your Apple TV remote - Apple Support
CEC support is not universal. Each model device may support a subset of the commands. If your TV doesn’t support some functionality, then that can’t be helped, unfortunately.
CEC has to be turned on, on both the Apple TV box and on the TV. With CEC, turning on the Apple TV box could also turn on the TV, if supported by the TV. With CEC, turning off the Apple TV box could also turn off the TV, if supported by the TV.
If you can't control your TV or receiver with your Apple TV Remote - Apple Support
Volume control is often* not through the Apple TV box, but directly to the TV (or audio system), if that has an IR receptor. The remote uses the most common commands by default. Only for aberrant commands would reprogramming be needed. There is also a setting to overrule, when Automatic doesn’t give the desired result.
Settings﹥Remotes and Devices﹥Volume Control﹥Auto|Receiver via IR|TV via IR|Off|Learn New Device
Control your TV and volume with the Siri Remote - Apple Support
* Volume control through HDMI-CEC is available for supporting AV receivers. I don’t think any TV supports Volume control through CEC.