Can't you imagine the circuit like this? It's not working...
The thick black wire is supplying 12v through the transformer.
What I understood was that the pin in the middle of the 8-channel board was supplied with 5v to receive information from the Arduino, and the power to be supplied to the solenoid was supplied from the lower right of the 8-channel board, isn't it?
Another answerer 2
Look at the picture above and take a closer look again.
If you put DC 5V from the middle pin as shown in the picture above, there is no need to supply power to the right power supply side, just connect the jump pin (yellow).
But in your case, I think you may have connected the power supply to the wrong power supply. The left of the 3 pins is GND. The right side is 5V, and the color of the wire is usually 5V for red. Check that the power polarity is correct.
As always, mistakes are not made by machines. Mistakes are made by humans. Take a look at it step by step. Obviously there is something you are doing wrong.