Using an Arduino as a gate driver

I’ve been interested in repeating the circuits built in the GreatScott video titled “DIY Buck Converter || How to step down DC voltage efficiently” and I came across something that didn’t make sense to me. In the circuit where he uses the Arduino nano to drive a PMOS, he connects the source of the transistor to 12V, then a 10k resistor from source to gate, and finally the gate to a PWM pin on the Arduino. The schematic looks as shown in the attachment.

My question is this, how would the PMOS be turned off (reach cutoff) using this scheme? From my understanding, the voltage difference from gate-to-source (Vgs) would need to be pretty low for cutoff (i.e. around 2V). Wouldn’t a PWM output of 5V make the voltage difference 7V and thus not stop conducting? The only way this would make sense to me otherwise is if the internal circuitry just doesn’t sink current, and so it looks like a high-impedance when on. Is that correct?

(I might have just answered my own question. My theory is that there’s a push-pull output, so when the output for the Arduino is turned high, it refuses to sink current, and thus can block any external voltage incident on it)

Just another youtuber that thinks he knows what he is doing.

With a heavy load (the light bulb), a non-logic level fet could be in the linear region (partially off) with 12-5.65= 6.35volt Vgs (5.65 is the estimated HIGH pin voltage reached including the internal pin clamping diode).

Must of course use a level converter between Arduino pin and mosfet if the P-channel fet is powered with a higher voltage. See diagram three on this page. Leo..

I just caught myself making Great Scott's mistake in another thread. I think your issue with his circuit is well founded. And the push-pull idea isn't the answer because of the clamping diode to Vcc that Leo described. The diode will conduct no matter the state of the I/O pin if voltage applied there is above about 5.65V. So Great Scott's design is wrong if he is switching a voltage higher than the Arduino's Vcc.