IRF520 MOSFET Transistor to convert 3.3v to 5v?
Here is a sample schematic of turning on a relay using a mosfet






simulate this circuit &ndash; Schematic created using CircuitLab

Updated to include flyback diode and pull down to turn off if no input is connected