CategoryOutline

An outline view hides parts of a buffer to better display the underlying structure.

Related: CategoryHideStuff

Emacs provides several outline features, some come bundled, some must be downloaded.

There is also ooutline and noutline which all refer to some version of ‘outline’, so they are not worth mentioning.

If you want basic IDE-style code folding without hours of research: