# using \section leads to a page break just in one case

I am using Overleaf to write my manuscript. In just one case, when I use \section{}, the section starts from the next page. When I change it to \subsection{}, it starts from where it suppose to be. This happens only in one case, and the rest of the \section{} in the other parts of the manuscript work properly. In the picture, you can see the difference.

Here is the parts of my code:

\begin{figure}[h]
\centering
\includegraphics[width=0.95\linewidth]{picture/Chapter-3/T-flowchart.pdf}
\caption{ Overview of the inputs and outputs of the thermal model.
\label{fig:T-flowchart}}
\end{figure}

\cref{fig:T-flowchart} demonstrates a graphical summary of the inputs and outputs of the thermal model. The outputs define the heat transfer coefficients of the PV module and the temperature of each module component base don the ambient conditions, material properties, geometry, and heat sources derived from electrical and optical models.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Coupling of the models} \label{Coupling of models}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Coupling of models to determine the electrical properties and heat sources under defined test conditions (DTC)} \label{Coupling of models to determine the electrical properties and heat sources under STC}
text text


• Can you give a MWE that reproduce your problem, it’s difficult to figure out what’s wrong with this screenshots Mar 2, 2020 at 21:24
• Mar 3, 2020 at 1:53
• Thank you both. I actually found my answer in the links provided by @JohnKormylo however, the funny thing is that it just happens for one of my \sections. That I cannot figure out. Using the solutions offered there fixes this problem but rearrange all other parts of my manuscript. What I am wondering is that why only this section, and why sebsection shows no problem Mar 3, 2020 at 8:48

You don't have any text that belongs to this section, therefore LaTeX waits for the next possibility page break and can't fit all the coming code in the remaining of the page. Try adding a single letter or blank \ and it should put it where you want.