I recently built my first rig and been using the hdmi cable that came with the MSI Optix G24C6 144hz monitor, which should be 1.4b. But now I remembered that the monitor is G-Sync compatible. Through googling I found out that majority prefers display port over hdmi but since I don't have DP, I'm not exactly sure if it's worth it (and hdmi 1.4b seems to support 144hrz anyway).
What exactly does G-Sync do and should I get the DP for it?
If you render at 144 Hz you won't be needing or seeing anything noticeable from variable refresh rates. It's most useful at lower framerates. So it depends on how (fast) your games/engines will render moreso than the refresh rate and cable.
You said in a comment your monitor supports Freesync, so HDMI 1.4 is likely useable for variable refresh rates through Freesync. Either way you can skip it with a high refresh rate of 144 Hz.