Charging Battery via solar panel to power a push action solenoid
A battery connected directly to the solar panel isn't a good idea because the battery could be overcharge (overvoltage) or the panel may not supply enough voltage or current to charge the battery. At minimum a regulator is needed (you could trickle charge the battery), but this will be inefficient. An MPPT tracker is needed to regulate the voltage at the maximum point of power from the solar cell. The battery needs a charger to charge the battery at the right voltage. A solar charge controller does both. Find a solar charge controller, connect it to the panel and your load (solenoid). You may also need a capacitor on the load, make sure the solar charge controller has the same voltage output that the solenoid requires and it can source enough current for the solenoid.

Source: https://zhcsolar.com/solar-panel-charge-controller-wiring-diagram/