Logging and converting the trees into lumber for building isn't free from a carbon perspective. A modern logging operation typically has several large diesel-powered heavy machines to cut down and move the trees. Then the logs are transported by diesel-powered semi trucks to a mill. The mill has many machines to move logs, cut them, and remove some moisture (kilns). Once they are cut, they are loaded onto more diesel powered trucks and delivered somewhere to sell.
Back at the site of the cut, piles of slash (all of the branches) are left on the ground to rot, or sometimes piled up and burned.
How long will the buildings made of wood last? Eventually they are bulldozed and hauled away to a landfill.