Should I get a USB C KVM, or a simple KVM and a Docking Station?

I have the following setup, one MacBook Pro M2 (Personal) and one MacBook Pro M1 (work). I have a single LG HDR WQHD screen. I don’t currently want to buy a 2nd screen to run the other laptop, I’d rather have a single screen on my desk and both computers connected to it.

Reading about KVM switchers I read someone suggesting that instead of buying a super good KVM, which will be more expensive. I can buy a Docking station and a simple USB-C KVM. I asked more information but the author didn’t replay to me.

I didn’t understand why KVMs are more expensive than docking stations.

Does anyone have a good advice about it?