The reason that folks face food scarcity is a distribution problem, not a production problem. We don't do a good job at making sure people don't go hungry, even in the US.
https://www.theguardian.com/environment/2019/sep/06/phosphat...
https://www.nationalgeographic.com/science/article/sea-runni...
https://www.siwi.org/latest/the-worlds-natural-aquifers-at-r...
https://www.nationalgeographic.com/science/article/groundwat...
https://www.idtechex.com/en/research-article/the-meat-indust...
again, overpopulation is a myth. a convenient and lazy one. but still a myth.
there are too many resources on the web explaining this.
We may produce enough calories in sugar, but stuffing the world with cheap junk food is not a solution. Total amount isn't a good metrics; total quality and availability would probably be better.