A nutrition table describes a food in a particular state, and cooking moves it out of that state. The changes are large enough to matter and follow a small number of predictable processes.
Heat breaks structures that digestion would otherwise have to break
Plant cell walls and the coiled structure of proteins both resist digestive enzymes, and cooking disrupts them before the food is eaten.
Starch granules absorb water and swell when heated, a change that makes them far more accessible to the enzymes that break starch down.
The consequence is that cooked versions of many foods deliver more usable energy than raw ones, even though the food itself has not gained anything.
Water-soluble nutrients leave with the water
Certain vitamins dissolve readily in water, so boiling transfers a proportion of them into the cooking liquid rather than destroying them.
Methods using little water, such as steaming or roasting, retain more of these, and using the cooking liquid recovers much of what boiling removes.
Heat-sensitive compounds also degrade with time at temperature, which means duration matters as much as method for these particular nutrients.
Some compounds become more available with heating
Not everything moves in the same direction. Several pigments and fat-soluble compounds are released from plant tissue more readily after cooking.
Cooking also inactivates naturally occurring substances in some foods that interfere with digestion or are unpleasant when raw, which is why certain items are not eaten uncooked.
So there is no general ranking of raw against cooked. The comparison has to be made food by food and nutrient by nutrient.
Physical form changes the rate of digestion
Cutting, blending and milling reduce particle size, and smaller particles present more surface area to digestive enzymes.
The same ingredient consumed whole, chopped or blended is therefore digested at different speeds, which affects the pace at which its energy arrives.
This is one of the clearer differences between a whole fruit and the same fruit juiced, and it operates independently of anything gained or lost.
High-temperature methods create new compounds
The browning that makes roasted and grilled food taste as it does comes from reactions between sugars and proteins that produce compounds absent from the raw ingredient.
Some of those compounds are the reason cooked food is appealing, and some are the reason very high-temperature methods attract more attention from researchers than gentle ones.
How much any of this matters depends on how often a method is used rather than on any single meal, which is the framing most food safety guidance takes.