The raw function takes a string and converts it into raw content. The backticks (```) also create raw content. So the error that your code generates is:
Expected string, found content
So the solution is to remove the call to the raw function:
#figure(
block(```
-- work
|--image
| |--- myphoto.jpg
| |-- dog.png
|--contents
| |-- chapter1.tex
| |-- chapter2.tex
|
|---report.tex
|---reference.bib
```),
caption: [the structure of the working directory]
) <working_dir>
Hi @masahiro, don’t forget to tick one of the responses if you got a satisfying answer. The answer you choose should usually be the response that you found most correct/helpful/comprehensive for the question you asked.