Single-monitor KVM's aren't that expensive. Dual Monitor KVM's can be expensive. Dual monitor, 4k60hz/ high refresh rate KVM's can be very expensive.
This midrange option is fine:
https://www.amazon.com/dp/B089LXG2W9/ref=emc_b_5_t
It's rated to 4k60hz for both monitors. It also seems to handle up to 1440p Ultrawide at 144hz according to the Q&A/Reviews.