Found on Reddit.

https://old.reddit.com/r/ZephyrusG14/comments/wypnhn/g14_hdmi_not_working/j7prhyj/

Just in case anybody else Googles this problem and the other solutions that were mentioned don’t work for them -

  • Go ahead and uninstall your display adapter drivers from the device manager window. There should be 2: AMD Radeon RX [your model number] and AMD Radeon™ Graphics.
  • Unplug your HDMI cable and restart your laptop.
  • When you’re logged back in, give your laptop a few minutes to re-install the drivers.
  • Open your device manager window back up to make sure that the display adapters are installed again.
  • Try to plug in your HDMI cable now and see if it works.

This worked for me after trying every other solution posted here. Hope it helps!