To prevent the edges of aluminum foil from curling up during cooking, you can dampen the edges with a little water or cooking oil. This helps to weigh down the foil and keep it flat. Additionally, you can fold the edges inward to create a small rim, which can help contain the food and prevent the foil from lifting. Another method is to use a heavier object, such as a ceramic dish or a small pan, to press down on the foil, keeping it in place. Ensure that the object is heat-resistant and won't react with the foil. These techniques can help maintain the integrity of your foil and keep it from curling up during the cooking process.