Pandoc supports explicit and implicit section references for headers; see the pandoc manual.
explicit: you give a custom name to a header ## Test {#test} and later refer to it with a link syntax: see the relevant section.
implicit: headers where you don’t set a custom name, like ## Test, can still be refered to: See the section called [Test].