According to an article posted by the Denver Health Medical Plan, while some raw vegetables provide the best nutrients, this is not the case for tomatoes, broccoli, and carrots. They elaborate that beneficial phytochemical are trapped in the cell wall of the vegetable until a heating method is applied.
However, it’s important to understand that different heating methods lead to different nutritional results within a vegetable. Research published by the Journal of Agricultural and Food Chemistry showed that boiling carrots increased all carotenoids (antioxidants) by 14 percent. Both steaming and frying resulted in in a decrease in antioxidant value, with frying reflecting the worst decline.
https://www.denverhealthmedicalplan.org/blog/3-vegetables-are-healthier-when-cooked
Antioxidants are crucial within an individual's diet as they are compounds in foods that scavenge and neutralize free radicals that can cause damage to other molecules (DNA, lipids, protein) within the body. It is true that carrots are healthier when cooked, but research shows this is only applicable with the boiling heating method. Other heating methods such as air frying, and baking have not yet been supported.
https://www.betterhealth.vic.gov.au/health/healthyliving/antioxidants