Raspberry pi 3 with mosfet for 18v led
Yes, the  reason is RPi's GPIO output voltage is 3.3v, and your mosfet is not designed for 3.3V logic level driving.

Replace the mosfet with one that has a vgs on of under 3.3V,  replace it with a NPN transistor so you can use current instead of voltage to turn it on, or use a mosfet driver cricuit, like a 2n3904 npn to turn on and off the mosfet from your RPi with a higher voltage.