How much do you have?
Since COVID, I always have in my house food sufficient for many months, because storing dry and frozen food ingredients does not need much space, even for a quantity sufficient for a half of year.
I normally also buy fresh fruits and vegetables, but they are optional, I could eat only food cooked from the dry and frozen ingredients (even for bread, I prefer to bake it myself, instead of buying it, so storing flour needs little space).
On the other hand, I do not have space to store water for more than a few days, so that is a more important external dependence than food.
Bean farm, potato farm, and chickens. As long as no one comes to attack me, I think I’m pretty much good indefinitely.
I generally keep a weeks worth of bottled water and dry stores at home in case of bushfires etc, preparation is always a good thing.