My header shows up in the right place in the Nav bar, but in the PDF export, it's in the wrong place

So in my document, I have a header 2. In the nav bar, it shows up under ‘Conclusion’. But when I export it to PDF, it shows up under ‘Chapter six’

pictures to understand:

NAVBAR

How do I fix this, and avoid this issue in the future?

Maybe you meant to to write “heading 2”. Or maybe you put a heading 2 in the header?
.
I guess, you put a Heading 2 in a frame. Try anchoring the frame below Conclusion. Better still, put the heading in the body of the text

Okay thanks, I somehow fixed it. Turns out ‘Conclusion’ was in a frame, and removing the frame fixed it. Thanks for the advice anyway!