Solenoid Valve problem

Driving a solenoid without a free-wheel diode? Instant death to semiconductors.... You absolutely
always need this when switching a highly inductive load. You were given the standard solenoid/relay
drive circuit in post #5

Trying to drive a solenoid from the very limited current from the 3.3V rail probably isn't going to work anyway.
The project you link to uses Vin for the solenoid power.

Its also (like many random circuits out there) a bad circuit - the lack of free-wheel diode across the solenoid
and the selection of a non-logic-level MOSFET betrays a lack of very basic electronics knowledge.

Diode across the solenoid - always required.
Logic level MOSFET is required if driven from 5V (otherwise 12V drive is required).

I know I'm not good at this, and I don't have any electric experience. I just got this from school and they told me what to buy and I did that. And I'm aware it isn't the best option probably, but I can't do it on another way, because I'm needed to hand in on Friday and ordering new pieces won't be delivered on time. I was following the online tutorial, and he managed to let it work with these components, to I thought I would succeed too..

I managed to get a diode and another Mosfet with logic level 3 to 5