Socialism as described by Marx was fundamentally democratic, the phrase 'dictatorship of the proletariat' means a worker centred democracy. Just because some countries call themselves socialist doesn't mean they actually are, like China is clearly state capitalist.
This video by Noam Chomsky goes into detail about why the USSR wasn't socialist and why the Soviet Union called themselves something they weren't