MacBooks can easily connect to HDMI devices. You’ll need an HDMI cable and a suitable port. Most Macs have their own HDMI ports, but newer and smaller versions operate Thunderbolt or USB-C. In this case make sure you have an adapter.
To enable sound from your Mac on an HDMI device:
Unplug any devices plugged into your Mac, especially headphones
Go to Apple Menu → System Preferences → Sound → Output
You’ll see a list of devices for sound output. Select your HDMI device from the list
If you’re using an adapter, make sure it’s properly connected and supported by your Mac