I’ve been using this one for over a month since I got my Xbox series x when I switched from gaming on pc simply cause graphics cards have been ridiculous expensive, and its been working great
UGREEN USB Switch Selector 2 Computers Sharing 4 USB Devices USB 2.0 Peripheral Switcher Box Hub for Mouse Keyboard Scanner Printer PCs with One-Button Swapping and 2 Pack USB A to A Cable https://www.amazon.com/dp/B01MXXQKGM/ref=cm_sw_r_cp_api_i_F8YDTBSH513F6PAKVFBA?_encoding=UTF8&psc=1
I have this one
https://www.amazon.com/dp/B01MXXQKGM/ref=cm_sw_r_awdo_dl_BK02HHJ2BP22XZFDVKQ7
I use a pc and Mac mini. I’ve only used it for a mouse, keyboard and sd card reader so far and they all work fine, I had to connect the keyboard directly to the Mac mini first, then plug it into the kvm, otherwise I kept getting a message about the layout of my keyboard.
I’ve heard it can be hit or miss depending on the usb device, like I’ve read my stream deck might not work, but I haven’t tried because I got it for video editing on my Mac.
I saw another post where they said you can use this splitter to connect both to the same usb connection it's a splitter.
I use Display port for my PC and leave the HDMI plugged into my USB-C hub like yours, then I change the input on the monitor when I need to switch. Then, I use a USB hub for keyboard, mouse, mic, & webcam like one of these and I keep one side plugged into the USB-C hub and the other in the desktop.
(Note: if you need USB 3.0 throughput, you'll need a more expensive switch, but for a mouse & keyboard you should be good.)