In the Harry Potter series, there are certain magical objects called "enchanted cookware" that can be used to conjure and cook food with the aid of a wand. In Harry Potter and the Goblet of Fire, Mrs. Weasley uses a saucepan that is specifically enchanted to assist with cooking tasks, allowing her to conveniently prepare meals with the help of her wand.
However, in the last book, Harry Potter and the Deathly Hallows, during the camping scenes, the trio of Harry, Ron, and Hermione is on the run and living in hiding. They are being pursued by powerful dark forces, and to avoid detection, they take measures to conceal their presence, including avoiding the use of magic to cook food.
Using magic, especially in the open, would draw attention to their location and put them at risk of being discovered by their enemies. As a result, they are forced to rely on more conventional methods to prepare their meals, such as foraging for food, using basic camping equipment, or cooking over a fire. This limitation is necessary to maintain their secrecy and ensure their survival during their time in hiding.