Government ownership/operation is rarely a problem by itself. With the right management structures and incentives, they
can be as productive and efficient as privately run businesses. In some examples, they can actually out-preform privately run businesses.
Around the world, there are many (partially) publicly owned logistics companies (airlines, cargo shipping lines) that are good examples of this working well. They can easily be profitable for the government owning them during the good times, they can actually run leaner with smaller rainy-day funds and be competitive with the private companies they are competing with. They can also operate in markets where private companies might choose to not operate, and can even drive more business to a country. Then when the bad times come around (for example, covid19 shutdowns), they can rely on government subsidies to get though the harsh times reasonably unscathed, while private companies might end up needing to do extreme cuts, or even go bankrupt.
With your example of the USSR, we are talking about an economy where every single business is collectively owned. And then to make things worse, the entire supply chain is collectively owned, and centrally planned. You can hire a good manager for the local store, but they aren't going to be able to change a thing when the government doesn't allocated them enough product to sell. You can't have two local stores compete with each other, they are both collectively owned and supplied by the same centrally managed supply chain.
It wasn't the collective ownership of the store that failed the USSR. It was the central planning of the whole economy.
With this example of a small small town grocery store, there is plenty still competition. There is the local Dollar General with it's shitty product selection. There is another government owned supermarket a in a town 9 miles away, operated by a different government. There are privately owned supermarkets in at least three larger town within 30 miles, and a town large enough for Walmart 45 miles away. There are probably also grocery delivery services (or at least amazon) covering the areas.
It will be forced to be competitive, and all the numbers are public for the residents to see.