Press Tab after brew ins in a fresh zsh setup on a Mac and you may get nothing useful. Homebrew ships completion files for zsh, but they sit in Homebrew’s own folder, and zsh only uses them once its completion system is running.
According to the Homebrew docs, brew shellenv adds Homebrew’s zsh completion folder to FPATH. The docs ask you to make sure that line runs before zsh initialises completion. Then add this to ~/.zshrc:
autoload -Uz compinit
compinit
Open a new tab, type brew up and press Tab: zsh now offers the matching brew commands. Formulae that ship their own zsh completions, like many command-line tools, get Tab completion through the same folder.
Skip this if you use Oh My Zsh: it calls compinit when it loads, and a second call only slows your startup. External Homebrew commands are the exception: their completions are not linked automatically, and brew completions link turns them on.
The caveat is the warning about insecure directories that zsh sometimes prints. Run compaudit to list the folders it means, and remove group or world write access only from those. The Homebrew docs say plainly not to change permissions recursively across the whole Homebrew prefix, and I’d follow that. A blanket chmod there causes more trouble than the warning.
Further reading: Homebrew: brew Shell Completion