The MCU has a maximum output voltage on P1 of 3.3V but the input on the Source of the P channel mosfet is either 12/24V. I can't find a P channel mosfet with a VGS_th that suits this schematics. How would I solve this problem so that I can switch the mosfet on with a 3.3V MCU output pin voltage?
Unfortunately you can't drive your P-fet in the way you are thinking.
Common N & P channel mosfets are (approximately) turned on and off by changing the voltage between their Gate and Source pins. When Vgs = 0 the P-fet will be off and when Vgs is more than a few volts your P-fet will be on.
In your circuit this means you need to drive your P-fet's gate with about 12 or 24V to turn it off (because that's the only way of getting Vgs ~= 0). Note that if your IC outputs either 0V
or 3.3V then the P-fet will be on regardless (because Vgs ~= -9 to -12V, or -21 to -24V, which are all above the VgThresh of almost all mosfets).
There are many ways of "level shifting" your 0-3.3V signal into something more like 0-12/24V. Use those keywords. Also lookup "gate driver" if you need something with higher performance (eg rapid switching).