I’m using Logitech MX Vertical mouse and MX Keys keyboard. Tap the device selection button on each and you switch devices. Easy peasy.
Both of those devices also support Logitech’s Flow software that allows more seamless device transition between a Mac and a Windows machine.