If your GPIO is set at 0 volts, Q1 will be on and, if the GPIO is higher in voltage, Q1 will still be on. This means M1 will always be on: -
You need to connect R2 to ground and not 3.3 volts.
Alternatively, why don't you ditch Q1 and directly drive M1 from the GPIO via a 100 ohm resistor.
What load are you using and what voltage are you measuring across the load? Also double check you have fitted the correct MOSFET and that you have drain and source the correct way round. Double check these things.
Thanks for the help you provided me, the problem was the mosfet drain
and source being the wrong way round. Now the circuit works with the
100ohm resitor just fine. I also tried the circuit with the npn
transistor and it works too. So thank you, not only you helped me
getting it to work but also to minimize parts list