Maybe it’s important to state that the flyback diode is placed right on the relay contacts
This makes no sense at all. A flyback diode has absolutely nothing to do with relay contacts. It goes across the COIL (NOT the CONTACTS).
Look at the schematic (YOU posted) . (the diode is shown across the solenoid , not the contacts)
YOUR RELAY IS WIRED BACKWARDS !
The contacts are supposed to be connected to the solenoid and the relay coil is supposed to be switched with a transistor or mosfet.
The arduino turns on the transistor , which turns on the relay which switches the contacts , which connect the solenoid coil to GND , completing the current path for the solenoid coil.
Usually the solenoid is powered with a transistor or mosfet.
Using a transistor to switch a relay to switch a solenoid is redundant.
It doesn’t mean it won’t work. It just means it is overkill when you only need to switch the solenoid.
What’s messed up is your relay is wired backward. The contacts should be switching the solenoid and the relay coil should be switched by a transistor or mosfet.
Try googling “arduino powering relay and solenoid”
Here’s and example:
arduino relay and solenoid
Now imagine solenoid in place of the relay in that schematic.
Alternately you can use the schematic as is an connect the solenoid coil to the N.O. contacts of the relay so the relay contacts complete the circuit path for the solenoid. (although, as I mentioned, that is redundant, unless the solenoid is a very large one.) Even if you did use a relay to switch a solenoid, the COILS of the two devices would NOT be in SERIES as you have depicted.
If you are able to control the solenoid then there is no way it is wired as you have depicted and the schematic is not really telling us how you have it wired.
Look at the relay schematic I posted and then look at the schematic you posted.
Can you find another schematic wired like yours anywhere on the web ? (hopefully not)
Southpark: How can you look at the OP’s schematic and then post this ?
Remember to use bypass capacitors for the arduino and other devices.
(the error is rather obvious)