Since HDMI can carry both audio and video signals, it would seem that by plugging in your second monitor on an HDMI port your computer thinks that is where audio should be sent to. (I suspect this may be a Windows default.) Does your second monitor have (built-in) speakers? If so, have you tried turning them on or up? Do you then hear sound?
If so, you need to check your audio settings and change whichever output is set with your second monitor plugged in to whichever output you want to use. However, I suspect that, if you subsequently unplug and later replug your second monitor the problem may well occur again, because Windows has active sensing and will assume that whatever is plugged in "last" is to be the output in use. Especially if you are using a laptop.