We are glad you asked. Carpenter bees are native pollinators that are good to have around. Obviously though you'd rather they not tunnel in your wood structures.
This page tells you more about them (like why they shouln't be feared as to stinging) but also more: https://extension.umd.edu/hgic/topics/carpenter-bees
Essentially the answer to deterring them without hurting them is to paint or stain the wood surfaces. They like the old, bare, weathered wood the best for use as an area to raise their young.