If you want to switch things like lights with your Raspberry Pi, you need a relay board.
A relay is an electronic switch that can be switched with a low-voltage signal.
Exactly what the Raspberry Pi offers as GPIO pins.
The relay board I’ve found is ideal for the Raspberry Pi.
It has 8 relays and every relay can separately be switched with the Raspberry Pi because it has 8 GPIO pins.
Also, the voltage needed to switch the relays is 5V, this can be taken directly from the RPi.
This is why you don’t need any additional electronics.