Well, eonomics is complicated, but the provision of Public Goods is usually the major case considered if you ask what government is good for. Public Goods are very specific, thowever, and hilariously enough are usually actually created or provided by private means even if the government is paying for it.
A Public Good is non-excludable and non-rivalrous, which is the fancy economist (or Wikipedia) way of saying it’s really hard to charge people for. Note that it’s not impossible to charge people for them - it happens all the time. It’s just usually more trouble than it’s worth. A common example is that roads are usually provided by for the government. It’s difficult (not impossible, just tedious and expensive) to charge poeple for using roads all the time). So it’s easier to do so through taxation.
But that is hugely different than Seizing the Means of Production, which basically never went well. Some municipalities have road crews, but most road construction is done through private companies, because it’s much more efficient that way. Many of the “government” services people think of, such as the United States Post Office or power companies, are actually private companies who get certain priveleges in exchange for undertaking a public service, some of which may be money-losing. This is actually the classic form of the corporation and goes back at least the Middle Ages, and maybe much earlier depending on what you think of Roman-Republican-era Publicani.
If you want to talk about real Socialism or Communism, you run pretty rapidly into the fundamental organizational limits of human society. Entire social classes or nation can’t really take overnership or anything, because it’s impossible to coordinate effectively. Left-wing revolutions, no matter how idealistic, have more orless inevitably fallen into dictatorship not just because of corrupt men, but because they are trying to do something literally impossible. Government, at least in the human sense, requires some way of selecting a small selection of leaders who make decisions. Exactly how small that group is, whether it coordinates decisions with an entire nation or people, and what limits exist on its power is ultimately the question of political science.
You get the same issue in the economic sphere. You can get relatively small Co-ops. They exist, and they function just fine. But they haven’t been winning against the wide array of corporations, limited partnerships, and sole proprieterships and don’t show much in the way of long-term advantages over those forms of ownership. Further, since it turns out that we simply don’t have a better way to signal value than price, any form of economics that tries to remove price signals will inevitably underperform or even go backwards.