If it isn't private it is governmental. That is not the same as socialist. By your definition every country is socialist because all have governmental functions.
Terms like socialism and capitalism are economic systems that allow us to distinguish between different types. According to you, both China and the U. S. are socialist because they both have public functions performed by the government.
There are books on comparative economics that explain the different systems and the variations. A country is not socialist because the military is a government function, but because the major means of production and distributions are public. That would include banks, oil companies, ship building, steel production, agriculture, airlines, healthcare, etc. In a capitalist system those are private entities. Most European healthcare systems are not socialist but private like Medicare.