I do think you need legislation that helps or encourages socialism, at the very least. Laws that organize healthcare, for instance, or encourage co-ops or non-profits. Existing laws favor corporations and the wealthy. I agree that a bottom-up action is necessary as well... but it won't get far without top-down help.
As Torco pointed out, this is the case of many necessary reforms.Also, if socialism is voted into place, it can be also voted away as well.
There are several ways socialism can be protected. One is the constitution: here in France the (communist-inspired) preamble to the 1946 is held to be constitutional; among other things, it states that 'the Nation guarantees [...]healthcare, material security, rest and leisure.' That means that there are a number of things you can't easily vote away. Right-wing governments could do their best to do away with socialized healthcare -- in fact, they did restrict it to a certain extent -- but it would take significant effort.
A second one is that socialist institutions are often popular, and getting the political momentum to get rid of them is difficult. As Elon Musk noticed, Social Security in the US is socialism -- and Musk couldn't get rid of him; in fact he didn't even get to try. As I understand, doing so would be political suicide.
Conversely, when socialist measures are voted away, well, often of course it's corporations and right-wingers and the rich doing their things. But democracy works and sometimes things are voted away because they don't work. Getting back to France again, yes, most of the nationalized companies were sold away, which is a pity. But then again, forcibly nationalizing every large company wasn't the right approach; ultimately it didn't help much so of course that approach lost the election.