For all packages:
brew deps --tree --installed
For one package only (e.g.):
brew deps --tree --installed vim
Thanks to rob-kovacs for suggesting the --tree
addition
See this helpful article for details: https://blog.jpalardy.com/posts/untangling-your-homebrew-dependencies/
Especially if you’re interested in creating a graph of the dependency tree.