protect digital OUTPUT pin

That diagram shows an IRF1405 MOSFET which won't work from logic levels. You require a logic level
FET if driving at 5V.

If by "protect" you mean in case the MOSFET fails, then use a MOSFET driver chip, add 4k7 between
arduino pin and input of the MOSFET driver, which will usually be enough to prevent cascade failure
of MOSFET and driver from taking out the microcontroller too. An opto isolator is another option for
this, but most opto isolators are way too slow for PWM if you want that.