This might work (I recommend reading all of the user comments/reviews if you intend to purchase):
https://www.amazon.com/USB-C-Sharing-Switch-Pass-Through-US3342/dp/B07XQLY5JK
A similar previous discussion:
https://www.reddit.com/r/UsbCHardware/comments/k2v3y5/usbc_switch_to_share_between_two_computers/
HTH.