Before the food itself, it helps to know what is happening in the pan. Cooking changes nutrition in three main ways, and understanding them makes every example that follows click into place.
The first is physical. Plant foods store many of their nutrients inside tough, fibrous cell walls that your digestive system struggles to break down on its own. Heat softens and ruptures those walls, releasing the good stuff so your gut can reach it. The second is chemical. Some plants carry natural compounds that actively interfere with absorption, and warming them up can quiet those compounds down. Broadly, these are known as anti-nutrients, and a well-known review of plant anti-nutritional factors in the journal Food Production, Processing and Nutrition notes that oxalates, phytates, tannins, and protein-blocking compounds can bind minerals or hinder digestion, and that everyday methods such as soaking, boiling, and fermentation can meaningfully reduce them.
The third change is transformation. Heat can convert a nutrient into a different form of itself that happens to be easier to absorb, which is exactly what happens with the red pigment in tomatoes. None of this means cooking manufactures nutrients from nothing. It simply frees, protects, or reshapes what was already there. This is also part of why processing isn't automatically a bad word, a nuance explored in the difference between processed and ultra-processed foods.