If anything, Star Trek has always promoted a more liberal ideal than a leftist one. Federation Credits were a barter system that was used in the 23rd and 24th Centuries, so some form of capitalism still exists. if anything, they identified it as a post-scarcity society with liberal stances, so its neither socialist or capitalist...its become basically non political in the economic sense.
The problem here is the commonplace oversimplification of the political landscape.
Where that landscape is increasingly populist various philosophies which could loosely be termed "left wing" in the traditional sense have become more closely affiliated in common parlance. It's easy to make slogans about simple tribal divides, much harder to include nuance and depth of analysis whilst doing so. I'd suggest sadly the average voter might struggle to actually explain the difference between liberalism, socialism, communism or a left leaning libertarianism. In fact many wouldn't even be aware there
was a difference because the world is seen as being divided neatly into two camps.
I'm not wanting to derail into yet another "is there money in the federation" thread because it doesn't really matter one way or the other and frankly the answer depends on which episode you are watching anyway. "Some form of capitalism" can sit entirely comfortably within a truly left wing framework.
Even leaving aside the question of liberalism and where that truly sits on the so called "political spectrum" there are theories of socialism which not only can co exist with a free market but outright rely on it, operating at the level of the cooperative rather than the nation. Google is in fact very much an example of a major corporation whose mission statement is distinctly socialist in flavour and functions perfectly well within a free market without that being a source of conflict. The idea that the 23rd/24th century need be constrained by a binary free market/public sector divide doesn't really wash with me
Add into the mix the question of what exactly "socialism" would mean in a society which is, as you say, post scarcity and the labels we currently use start to look quite obsolete, at least in the economic sense.
What is more meaningful than trying to categorise a fictional society according to labels which don't really even work now is what the show has to say about the world we live in now, what questions it forces us to ask about our own values and worldviews. If entertainment and the media can encourage us to at least think about those questions more deeply than we currently are doing then it's working by my measure.