HDMI-0 (closest to the USB-C port) is the primary output for A/V. You shouldn't have deal with config.txt for this. Defective device.
I don't think I've *ever* heard of a defective pi that has working hdmi video and non-working hdmi audio (the physical pins used are the same for audio and video).
The issue if either going to be a configuration issue, or some incompatibility with the specific display.
If you have another hdmi display, please try that.
If you have no hdmi audio on a clean install of RPiOS, then try creating an issue here.