This is what I use usb switch. It even comes with a remote so no need to touch the inputs. It comes with an AC adapter if you need more power. I don’t have both my laptop and pc powered on at the same time.
https://www.amazon.com/dp/B083JKDNRJ
USB 3.0 switch with 4 inputs