How do I get tree-style navigation?

Emacs uses a buffer definition navigation facility called Imenu. There are several packages to navigate Imenu to your liking. The author maintains the Emacs package Side Hustle to display and navigate the buffer Imenu in a tree style in a side window.

See (emacs)Imenu.