My shift register is working when I use LEDs, but not a solenoid
Use any power transistor ( BJT or Nch FET) as a low side switch, that can easily drive 300mA, which the CMOS SR cannot.
Use a switch rated for low power dissipation (I^2R)  or very low Ron on the low side plus a flyback diode from the Switch (drain or collector) to the opposite rail (Vbat) to continue the current but decaying to zero with the back EMF reversing polarity.
6V/300mA = 20 Ohms + tbd mH inductance. So for 99% efficiency use a switch that is 1% of 20 Ohms or ~ &lt;= 0.2 Ohms at 6V = Vdd = Vgs
From the datasheet sect 7.5 for that Sh.Reg., the Vol @ Vdd=6V at 7.6 mA Vol= 0.15V typ. @ 25’C and 0.26V max
Thus computing Ron (low is usually better than hi) Ron= 0.15V/7.6mA= 19.7 ohms typ. (Or the same as your solenoid ( no good) and Ron=0.26V/7.6mA =34.2 ohms max.
Bad example
If one used a PN2222A computed as 2 ohm switch with Ic/Ib=10 in order to drive 300 mA you need 30 mA base current from (6-0.7V)/30mA =33.3 Ohms which in theory only needs 10 ohms added from CMOS to Vbe but 300mA*2 Ohms =600mV Vce(sat) and Pd(sat)=300mA * 600mV approx. 180 mW with 10% more from Vbe power with Rja thermal resistance =200’C/W means Tj rises 40’C and similar another rise in CMOS temp.
So this might work in a pinch but not with much margin.