Most of the time this happens because the computer gets booted up before the monitor is connected so the computer does not sense that the speakers exist. If sound is not working, try restarting the computer.
If that doesn’t work, there is a configuration setting. In the upper right corner is a volume control.
If you right click you get a selector. Pick hdmi and that should work. Also, make sure the volume is turned up.