I did get an answer from the DigitalOcean community that said that Caddy has access to the /var/www directory though it is owned by root. I have not yet understood why but apparently it is due to some special properties of that directory.
And if I wanted to have the static site in a user’s home directory I would have to do a sudo chown -R caddy:caddy
on that site.