Every paragraph style has provision for extra space above and below its context. This is set in the
Indents & Spacing of the style definition.
- Display the style side pane with
- Right-click on the relevant style name (Heading n in your case) and
- Go to
Indents & Spacing tab and change the values in the Spacing section to your liking
In case your headings are at top of page, you may want or not to have the spacing. This is configured in
Compatibility, Add paragraph and table spacing at tops of pages check box
I recommend you read the chapters about styles in the Writer Guide.
To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!
In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.