Food holds a central place in every human culture. Our traditional foods have evolved over time, reflecting available ingredients, cultural practices, and collective tastes. In her book Gulp: Adventures on the Alimentary Canal, Mary Roach comments that we– both individually and collectively– learn to like whatever it is that we eat, whether that’s peanut soup, corn tortillas, garlicky scorpions, or fermented shark.
Food is a great tool for worldbuilding and pulling the reader into the sensory environment of your story. Think about what the people in your setting grow, catch, raise, and gather. Think about what cooking techniques are available. Think about what foods are staples, which foods are rare delicacies, which foods are seen as low-status or high-status.
Now, if you’re working with a real setting–historical or contemporary– this is fairly straightforward research task. Ideally, you can try some of the food you’re writing about, either by going to a restaurant or following a recipe. This may not be feasible, depending on where you live, whether you can purchase ingredients, how popular that particular cuisine is, and similar. But if you can, this is a worthwhile and delicious avenue of research.
If you’re working from scratch with a fantasy world, start with their ecology. What grains, vegetables, herbs, and spices grow in this climate? Is the growing season long, short, or year-round? And what fish, birds, and animals live in this environment? Does this culture have domestic animals? If so, what are they? Which of these are staple foods? What key flavors are dominant?
Then think about what foods they might be able to import. Do they have trade relationships with people who live in extremely different environments and might provide them with exotic foods? What are hard-to-find luxury foods?
Answering those questions is a great way to start imagining some specific and memorable foods for your characters to eat, and a window for readers into the world of your story.