A public good isn’t one that’s made by the state’s enterprises. There are excellent, and not so good, reasons for the state to hold a large fraction of the productive capital in the economy. The state may also turn out to be the best provider for some public goods, but that’s a consequence, not the source, of their definition.
A public good is also not the same as a good whose provision is a moral necessity. Sometimes the two are aligned, but they’re not the same. Providing food is a moral necessity, but usually it’s handled as a private good. Public transport isn’t a pressing moral necessity, but I argue it is best handled as a public good.
At a certain point on its demand curve, a good is marginally public if the net benefit to society increases when the price, or other barrier to consumption, decreases. It is marginally private if the converse happens. Colloquially we can say a good is public if it’s marginally public for all realistic price points, and we can call a good private in the converse case.