On startup, compinit checks the ownership and permissions of every directory in fpath. If any is group-writable or owned by another user, it prints 'zsh compinit: insecure directories, run compaudit for list' and offers to ignore them, which usually leaves completion broken for the affected tools. It is a genuine security check: a writable completion directory lets another local user run arbitrary code in your shell.
Run 'compaudit' to list the offending paths. On macOS with Homebrew the usual culprits are the share/zsh and share/zsh/site-functions directories under the Homebrew prefix, which end up group-writable when several accounts share the installation. Fix with 'chmod go-w' on the listed directories and 'chown' them to your user, then start a new shell.
'compinit -u' skips the check and 'compinit -i' silently ignores insecure directories. Both are appropriate only on a single-user machine you control. Deleting the stale ~/.zcompdump cache is also needed if completions were cached before the fix.