I am really surprised that evernotes editor is still so poor and i find this distinction between a note and a document rather artificial.
Look at Obsidian, Confluence or just simple markdown or reST. The later two use a preprocessor to generate a toc from the headers.
Like for example is done on github or with pandoc.