@kebson Thinking about your message, I assume that you connected the collector of the transistor to GND and control the relay though through the Vcc & GND pins of that relay board. Two topics are to be discussed:
Current draw. According to the data sheet, the coil resistance is 70 Ohm, resulting in an current of 47 mA at 3.3V. At that load, the output voltage should be lower than 3.3 V, so it might "just" fit. At about 3V, the force at the relay contacts may be lower than at 5V, causing higher relay contact wear.
Flyback voltage peaks. If you did not remove the flyback diode from the board, that might work, at least for a while.
But still I would not consider to connect an inductive load directly to the ESP32 output pins. It may work for a while, but then break.
B.T.W.: What is the mains voltage/power of the Pump?