Powering 24 V DC 5/3 solenoid valve

I am trying to do a pneumatic suspension system using 5/3 DC solenoid valve. I tried using IRF540 MOSFET, but the soleniod never got energised. Is there any power source that can be used? Please do say any changes needed in circuit connections, since i am new to electronics.

You should use a logic level MOSFET, or a H-bridge module, for driving a DC motor or solenoid.

For analog valves a H-bridge and PWM is recommended, to overcome valve friction. Digital (on/off) valves can be controlled by a single MOSFET as well.