Besides shading, trees lower urban air temperatures mainly through:
Reveal the key without answering
Water evaporating from leaves takes up heat from the air, which together with shade cools streets and buildings.
Photosynthesis captures only a small share of incoming sunlight; the cooling comes from water leaving the leaves.
Tree canopies are usually darker than light pavement, so they do not cool by reflecting more sunlight.
Storing carbon affects the global climate over decades, not the air temperature on a hot block today.