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:
An HDMI-to-DVI-D adapter:
Assuming your Z370 does
not have any video ports (i.e., EVGA Z370 Micro or Msi Z370 Godlike Gaming), then, you are forced to buy a dedicated GPU because the motherboard does not support integrated graphics output.