We do have to be careful here in what is being proposed.
If the situation is that you only have a 3.3V supply (generally a lithium battery) and you need 5V for some function, then you can use a boost regulator to boost that supply voltage. These generally have a “control” pin on the chip which will switch it on and off under control of your MCU, or you use a transistor to switch your device from the output of the boost regulator.
What you can not do, is to use the boost regulator to increase the voltage from an output pin of the Arduino. Nor will it be profitable to use a transistor to switch the 3.3V input to the boost regulator.
And of course, if your actual supply voltage is higher and you have a regulator producing your 3.3V as you do on a Pro Mini or such, then you use a 5V regulator fed by that higher supply voltage and a transistor to switch.