Small KVM units don’t usually require an external power source. Such variants simply connect all your devices and peripherals. They draw power from the connected devices to work.
There are some KVM switches that have a DC input. In case you connect power-hungry devices such as printers, you would need to connect the supplied power adapter to the switch.
The enterprise-level KVMs do require power adapters as they handle a large number of computers. If you are looking for an affordable KVM for household use, you won’t require an external power unit.