You did not mention what model your motherboard is.
Assuming your Z370
does have an HDMI port, its located at the rear panel I/O ports of your motherboard, #8 in the photo below:
Assuming your Z370 does
not have an HDMI port (i.e., Msi Z370-A Pro or Msi Z370 Gaming Plus), your only option is to use adapters such as an HDMI-to-DisplayPort adapter or an HDMI-to-DVI-D adapter. You plug the HDMI cable from your monitor to the adapter, then plug the adapter to the appropriate port at the rear panel of your motherboard.
An HDMI-to-DisplayPort adapter...