I’ve installed nvm through brew on macOS Big Sur 11.2.3 (20D91) and got:
zsh compinit: insecure directories, run compaudit for list. Ignore insecure directories and continue [y] or abort compinit [n]?
After research seems I had to update all files/folders with correct permissions using:
compaudit | xargs chmod g-w
Note that sudo is not needed here as long as the file belongs to root.