Default umaks on macOS is 0077, which is different with most Linux distributions.
There're pros and cons about this very decision made by Apple. For the good
part, temporary files generate under /tmp, $TMPDIR are accessible
by the user himself only. These locations could be alternatives to $XDG_RUNTIME_DIR.
While, the problem is that since the new files are accessible by yourself only,
it's inconvenient to share files with other users.
It's easy to change umask globally with a LauchAgent, or change it for shells