Can I fold a heading inside another heading when using the link?

I use a lot of headings to layer my note and put them inside a main document.
My question is that I cannot fold the headings inside the secondary heading ,and is there any method to solve this problem?
I want every heading can be fold.