Voltage controlled switch
A P channel MOSFET will do the job. Pull the gate low relative to the source to turn on.

Here is a typical setup



HTH
Edit. Drive the p channel gate with a n channel device. Make sure both devices have a Vds rating of at least 30V.

That will let you drive a 24V load.