The famous saying is that civilization is only 3 meals away from chaos.
At least if we're talking about the rich countries, the government can always parachute food in. I can't imagine the whole of USA being hungry, when the first Covid lockdown almost caused this, suddenly every politician agreed to give everyone money (Socialism?! Handouts?! The alternative would've been political suicide, even the hardcore GOPs knew that).
The buying power (or the credit power, the promise that "I'll pay you") of the rich countries mean they can buy food, in the burning planet future where there isn't actually enough food to go around, the rich governments will probably even buy someone else's food leaving them hungry, and when money isn't enough coercion, the military will be.