Is this Termite or Carpenter Ant Damage?
Tell-tale of carpenter ants would be sawdust on floor or surroundings of the tunnels. Carpenter ants do not eat wood; hence, when they bore tunnels through wood, they push out the bits of wood through the holes in the wood which then accumulate in piles.

In the photographs appear to be the typical termite mud tunnels. Termites consume wood and then cover their tunnels with saliva, mud, and fecal matter. The dirt trails you see are called “mud tunnels.”