Switch sensors ON/OFF using transistor

I have a simple circuit with an ESP32 powered by a 3V3 power supply and some sensors attached. As I'd like to use the smallest amount of energy, there are some sensors and peripherials like servo I want to be switched off when they not needed, and power on when I want the device to use sensors.
As you can see on the attached pictures, there's a relay that does the job, but but it's just a schematic, and i dont wanna use a relay but a simple NPN transistor for switching.
I tried many ways, emitter to the ground, base goes to GPIO pin, and between +3V3 and collector put the sensors somehow, but none of them is working. Somebody some help?
It was long time ago when i learned about bipolar transistors, so i must miss something.

A PNP transistor instead of the relay should do the job. If you want to use an NPN transistor, connect Vcc of the sensors directly to 3V3 and place the transistor on the GND connection. Google has tons of example schematics for this.