I was looking into getting the MSI Optix G271 monitor but am now cautious because I am not sure if I will be able to hit 144hz on the external monitor using an HDMI 2.0 since I don't have a display port on my laptop..?
I looked at manual and 144Hz is supported over Hdmi 1.4b on page 29 preset display modes, as confirmed with V symbol. Manual doesn't mention Hdmi or DP version but does here; https://www.msi.com/Monitor/Optix-G271/Specification
In osd of menu page 19~20 is refresh rate option there if you need to toggle it.
Which Legion 5 laptop have you got exactly? because there are various models. Sometimes laptops can have usbc capable video port with same capabilities as DP 1.2. Just need usbc to DP cable. Hdmi will work fine though, even if it's v1.4b instead of v2.0 on this monitor.