Apparently, you’re working in direct formatting mode, i.e. you apply manually what you need.
The simplest solution to your problem is to apply ad hoc paragraph styles to your text.
Built-in Body Text is intended to format your main topic (not Default Paragraph Style which has a technical role as a recipient for your preferred “defaults” all over the document, such as font face, size, weight, alignment, spacing above and below, …).
Your headlines will be formatted with Heading 1-10, 1 corresponding to chapter, 2 to sub-chapter, etc. By default, all Heading n come with *Keep with next paragraph enabled. This will keep the headline and the immediately following paragraph on the same page.
BUT, if you’re vertically spacing with *empty paragraphs, only the heading and this empty para will be kept together on the page, not the text which follows.
Empty paragraphs have no value; they contain no information, thus they should be eliminated. Empty paragraphs always cause problems in Writer, first regarding vertical spacing.
Vertical spacing is a property of the type of paragraph. For example, a headline has a rather tall spacing before ans a smaller one below. Main topic has moderate spacing split equally above and below (refrain from setting only one because this will make your life difficult when you mix various paragraph styles).
Therefore, to fix your problem, eliminate all empty paragraphs and direct formatting, apply an adequate style to your text (Heading -, Body Text and many others as fit). Then customise the style settings to adjust spacing above and below to your liking. Since there is now no empty paragraph between your headline and text, both are guaranteed to keep together.
Why is it necessary to clear direct formatting (DF)? DF takes precedence over character style which itself takes precedence over *paragraph style Therefore DF settings will mask the same settings in the style making them ineffective.
Note also that adjusting styles has an immediate effect on the whole document. You no longer need to track and chase your individual DF applications.