They do not. Cuba has yet to experience a famine despite being under a severe embargo for several decades.
Famines also happen under capitalism. There are multitude of famines in east Africa to choose from, death count is well over tens of millions. Outside of Africa, the Bengal famine happened under British rule, death count 1-4 million people. While socialism was gaining traction inside British isles at the time, their colonies kept being ruled by harsh free market advocates.
However blaming capitalism for the Bengal famine is unfair, where imperialism, colonialism, and racism is a much better explanation, similarly, blaming communism for the Great Chinese Famine in Mao’s China is unfair, when fascism is a much better explanation.
Famines aren’t the only man-made disaster out there. It is hard to blame anything but global capitalism for disaster such as the Bhopal disaster, where one of the largest cities in India was poisoned in a effort to maximize profits for shareholders. Thousands died.
Together the disaster of capitalism cause several orders more deadly than the disaster commonly attributed to communism.