The limiting factor for most gardens is some mix of sunlight, water, and nitrogen.
You need at least 6 hours of sun a day to grow most food (greens are different but also have basically no calories), 8 is better. Most gardens in most climates need at least an inch of water per week. You can make do with somewhat less if you space the plants further apart. Nitrogen comes either from chemical fertilizer or from organic fertilizers where usually the soil life breaks it down into a form usable by the plants. In ideal circumstances, don’t use chemical fertilizer. It isn’t good for the soil life and that’s what’s actually helping grow healthy plants. If you’re in a crisis, don’t worry about it and lay on the miracle grow.
If things get bad and you can’t get fertilizer, save everyone’s urine and dilute it 1:10 with water, then apply. Don’t apply it on the leaves of anything you’re going to eat soon.
Keep all your household scraps and compost them. There are many fancy compost systems but you can also just bury the scraps in the garden. Ultimately you’re just trying to cycle nutrients instead of sending them to the dump.
Sunchokes/Jerusalem artichokes/fartichokes are a food that sounds great but very few people can tolerate in quantity. People claim that long slow cooking, not harvesting until after winter chill, and fermentation help. I think they’re mostly a curiosity.
If you really need to grow calories, in temperate climates that probably looks like corn, dry beans, winter squash, potatoes, possibly sweet potatoes, and maybe sunflowers for seeds/oil.
I think even if it gets rough, you might not really need to be self sufficient for calories. Which is also really hard to be honest. So it’s kind of good news bad news, because it’s hard to grow enough calories, but with even a small space you can grow a lot of herbs, tomatoes, greens, green beans, and so on. And it’s easier and cheaper to store a year of purchased rice and beans and then grow some fresh food, than the inverse.
If you don’t have good garden space, you can grow quite a bit in containers. Cheap containers are either repurposed or “grow bags”. Fill the bottom half of the bag with dry sticks and partially rotted wood and stuff like that and the rest with potting soil, the wood will hold water and you’ll save on potting soil. Containers will loose water more quickly than in-ground growing, so check the soil every day or other day.
Easy/encouraging first crops to grow are lettuce, radishes, basil, green beans. Tomatoes, zucchini and peppers (get these as starts at a nursery) are pretty easy for most people. You can start peas from seed right now and potatoes from grocery store potatoes if you want to experiment.