Your text has only one title, otherwise you will use subtitles.
Subheadings should be used to demarcate or separate one text session or line of reasoning from another.
A text written under a subtitle must be related to the main title, but it can even be a separate text from the other subtitles used on the page.
It is as if you take a module from your software, join it in another larger module and all this forms the software that the user will use, but each piece must be able to exist separately.
When you see that a piece of your text is no longer referring to the subtitle above it, it is a sign that you should think of another one and separate that little piece.
The sub-topics in your draft may even be the article’s subtitles, if that makes sense.
Avoid very large articles, create series
During the draft phase of a text you can already identify if the text is getting too big. For ease and to save time, you may use article rewriter tool.
In such cases it is interesting to break this article into several smaller ones. People don’t have much time to spend 20 minutes reading our texts, unfortunately.
When creating a series of articles, remember to warn in the first article that this is a series and at the end of the text leave a warning or a preview of what will be discussed in the next text.
You can do something like: Article xyz, part 1, part 2, part 3.
Your text must have a main subject and should not avoid this subject and the subtopics can be the subtitles of this article, you must also have understood that the article must have a beginning, middle and end and you know what to put in each part of the text.