A the core of socialism is the idea that workers control the means of production, rather than capitalists. The primary difference between capitalism and socialism is thus about the ownership model.
It does in fact not prescribe a particular form of how goods and services get distributed. Keep in mind socialism is a large umbrella term which encompasses a lot of different ideologies.
Within sub categories of socialism such as market socialism, democratic socialism, utopian socialism etc markets still exist where goods and services are bought and sold at market prices.
This isn’t just a theoretical exercise but reality. These systems exist in various forms. Israel was e.g. built partly by the Kibbutz system. A Kibbutz is a workers cooperative, a commune or what you may call it. These Kibbutz are typically communities of 20 to 400 people. How they are arranged varies widely. The earliest ones were essentially communist societies in a microcosmos. I say communist because they were based on the principle: “Each receive according to need, and contribute according to ability.”
That meant that in the early Kibbutzim and many who still exist almost everything is communally owned. Everything is shared. Yet the goods and services produced by the Kibbutz were sold in a free market and they bought products and services in a free market.
Although most countries don’t have Kibbutzim, many countries have worker cooperatives. Cooperatives are based on early socialism called Utopian Socialism. In a cooperative there are no shareholders. Instead the owners are the workers in the company. That means workers vote on who shall manage the company and where the direction it should take. Workers share the profits rather than shareholders. It may sound like this does not scale, but in Spain there is a cooperative with 70 000 employees.
How do these cooperatives get capital and grow? In Italy there is a region where there is a network of cooperatives. These put away a percentage of their earnings in funds, that can be used as investment money for starting new cooperatives of investing in existing ones.