Q1 is required because your MCU pin will not be able to go to 12V.
Additionally depending on the MOSFET, you may need another resistor
between the R4 and Q1 collector (providing a voltage divider) to
limit Vgs of the MOSFET.
I was confused by this until I've done more reading and learned about higher voltage thresholds required for p-channel.
Btw, would this work in place of the 2N3904 NPN? MMBT3904-7-F (https://www.mouser.com/ProductDetail/621-MMBT3904-F)
I'm not sure what you mean by "higher voltage thresholds required for p-channel". My comment was that you need to check the maximum Vgs limit is. For the two p-channel MOSFET mentioned above, Vgs = (-/+20V) it is not a concern since your Vin = 12V. (For example: If Vin=24V, you could not pull the gate down the gnd because it would exceed Vgs).
You mentioned Vgs threshold. Which is the gate voltage required to turn on the MOSFET. Your looking at the minimum voltage. I'm talking about the maximum voltage.
As far as the MMBT3904-7-F, it should be fine. In this circuit, pretty much any jellybean NPN will work.
Let me restate that the LED in @DavidAlfa's circuit will never turn ON. The voltage across the NPN base/emitter is one diode drop which is not high enough to turn on the LED. You could put the LED before R1 or on the NPN collector as I mentioned.
Overall, I think you're looking at something like this:
