You question doesn’t really make sense without defining your terms more carefully. When you say socialism do you mean a totalitarian form of government, like the Soviet Union was, or a democratic socialist government like Tony Blair’s Labour Party in the UK? And would the US be your example of a capitalist country?