The core outline plugin should update in real time I thought.
If you want a TOC in the note itself, I just stumbled over this awesome Dataview solution: