The Table of Contents Block is a great way to provide navigation for your long post content. You can choose which heading levels to account for. Optional smooth scroll to anchor can be enabled. Where this block really stands out is that it can be added to a sticky sidebar and has a scroll spy which can highlight which heading the user is currently scrolled to. This block does not need to be part of the post content but instead can be hooked into a sidebar to placed in a sticky area or even a modal.
Examples:
This is a H2 heading
Paragraph context
Paragraph context
This is a H3 Heading
Paragraph context
This is an H4 Heading
Paragraph context
This is another H2 Heading
Paragraph context
Paragraph context
Paragraph context
This is the third H2 Heading
Paragraph context
Paragraph context
Paragraph context