I have the same exact issue with my M1 Macbook Air and HP z27 monitor. EVEN MORE ANNOYING the built in hub works fine and I can use the keyboard and mouse PLUGGED INTO THE MONITOR, but can't get the monitor itself to detect. The MacOS developers stupidly also made the "detect displays" feature previously available by holding option on the displays system preferences NOT AVAILABLE unless you have an already detected monitor installed. What level of idiocy are they allowing over there at Apple these days?