Cooking can affect the iron content in vegetables by either increasing or decreasing its bioavailability. Cooking methods like boiling may leach iron into the water, while others like steaming can help preserve it better.