Which nutrients heat tends to reduce
Heat and water are the two main forces acting on nutrients during cooking. Water-soluble and heat-sensitive vitamins, particularly vitamin C and folate, degrade with prolonged or high heat and can also leach into cooking water that is then discarded. Boiling tends to cost more of these than steaming, microwaving, or quick stir-frying, which use less water and shorter times.
Losses are partial and depend on temperature, duration, surface area, and whether the cooking liquid is kept. Treat percentage figures as rough ranges rather than fixed values, since real losses vary with the specific food and method.
Why cooking can also improve a food
Cooking is not only subtractive. Heat gelatinises starch and denatures proteins, which generally raises digestibility and can improve protein absorption from foods such as eggs and legumes. It also reduces certain antinutrients like lectins and some phytates, and in some foods (tomatoes, carrots) it increases the bioavailability of carotenoids by breaking down cell walls.
This is general educational information, not dietary or medical advice. The practical takeaway is that no single method is best for every nutrient; varying methods across a varied diet is more useful than optimising one food.