Trouble Using Optocoupler (AL-ZARD DST-1R4P-N)
You've connected the solenoid between the output and ground so it's just going to turn the output LED D1 on, on the plus side (so to speak)  you've probably not (yet) ruined the board.
It won't be able to drive a solenoid of any significance, because it's just an optoisolator. You can look up the specifications of the optoisolators (those black 4-pin devices) but definitely they're not capable of driving most 12V solenoids.
You could add a MOSFET and a diode to make a driver, however. It doesn't even  have to be a logic-level MOSFET with that board. For example, an IRF530 etc. with a 1N4004 diode.



simulate this circuit &ndash; Schematic created using CircuitLab
In this case, the solenoid is energized when the LED or power is OFF. If you want the opposite you can use a P-channel MOSFET with source to +12 and drain to the solenoid and diode.