I swear, if I had posted a low side driver using an N channel device, the usual suspects on this site would say you could never switch an Rpi using low side. I can only image the OP’s frustration with the sudden turns in this thread, it’s enough to give one whiplash. Well, at least mechanical relays appear to be off the table. If that’s progress, I’ll take it.
Gets off soapbox...
With regards to my reply #12, I regret I didn’t credit Nick Gammon with that schematic and I overlooked the fact that the OP has a 3.3 volt, not 5 volt controller. In that case, the NDP6020P mosfet would be a more appropriate choice for 3 volts.
If the OP is willing to add a NPN bipolar transistor as a level shifter to the 5 volt supply voltage, the original mosfet part number is quite capable of the task. This is detailed on Nicks web site in the link below. It’s all explained there in great detail.
If the actual load of the Rpi is an amp or less, no heat sink would be required with either circuit arrangement.
Low side switching is the correct solution for single devices like motors and lamps with a single ground point connection. High side switching is the correct solution for devices that may have other, secondary grounding sources that you cannot or do not want to isolate.
Switching the power ground of a Rpi that has other things connected to it that have their own ground connections and potentially their own supplies is a sure fire recipe for failure.
Nick Gammons switching tutorial
Bald Engineer low and high side switching