The Federation is socialist. The rest of the Star Trek universe is kind of capitalist. But really there’s no much cause for an economic system of any type once you have replicators.
Replicators need raw material to operate. And if everyone is equal in the future, I want that sweet apartment overlooking the Bay. Kirk’s no more deserving than me.