How to add this table model?

There is a hierarchy between the notes according to their header (h1, h2, h3, h4). How to enable this feature?

I presume they are using different headings like H1, H2 and so forth.

Use single “#” for Heading 1 , Two “##” for Heading 2 and so on.

I am not sure if this is what you are looking for, or you could search for Bread Crumbs and read the documentation. This plugin helps you define/create hierarchies.