Basically the HomePods are the default audio output source so whatever audio signal the TV is receiving from the TV will be sent to the HomePods.
With that being said, you can use AirPods & other wireless audio devices with an Apple TV but not with the PS4 & PS5.
Set your LG C2 TV to these settings:
HDMI Input Audio Format: Bitstream
Digital Sound Output: Pass Through
HDMI eARC Support: On
Set the Apple TV to these settings:
Change Format: Off
Dolby Atmos: On