What components do I need to automate electric pump at home

do you have full access to the main tank ?
are you allowed to insert things into it ?
can you drill a hole in the side (optional)

same questions for your upper tank.

the motor drives the selection of relays. you need to know how much power your pump needs.
if, your switch is low voltage, like a door bell, then a simple relay might work.

I would offer that some PVC pipe and a vertical float switch float
would work.

you can screw them on a cap and insert the pipe. if you want 2 heights, a full and half. you can use 2 pipes or a tee and a second drop.

all the wire is inside the pipe and the devices are easily cleaned.

if your switch is low power, you can use a simple to use RELAY BOARD


this has screw terminals for all wires.
THE LABELS IN THE PIC ARE WRONG !!!
it does not use square pins as connectors, so it makes use more permanent.
if you want to solder your wires, you can get the type with square pins and not use the pins, just solder the wires

I suggest you put the relay into an electrical box of some sort. the ones you use for a light switch are often low cost, come in plastic and you can easily get a cover.

I prefer the NANO for permanent installations because you can use this shield