Black stains in wood, identifying the cause
It appears like mold, I found a link that goes over some simple ways to test if something is mold.
https://www.familyhandyman.com/list/how-to-test-for-mold/
I personally would check if the wood is soft, if the wood has an earthy smell... like the smell of dirt and decomposing leaves, both strongly indicate mold.