PIR sensor 3.3V output driving a mosfet loaded with 24V power LED
You can easily increase the gate voltage by 1.2 .. 1.4 V using a pull-up resistor and a couple of diodes:



This will toggle gate voltage between 1.2 and 4.5V instead of 0 and 3.3V. There may be a small current flowing into the PIR when it drives its output high, which is undesired but which the PIR will most probably cope with.

A more elaborate solution using an extra BJT would be:







simulate this circuit &ndash; Schematic created using CircuitLab

This will drive the gate between 0 and 5V, as you did manually, so it should work.