Please always post complete documents, especially in this case where the problem is in code you have not shown.
LaTeX already makes it an infinitely bad place to break after the heading, so if it does break there, something else on the page made the constraints infeasible, and all options were infinitely bad.
Consider
\documentclass{article}
\setlength\textheight{5cm}
\begin{document}
a\\b\\c\\d\\e\\f\\g\\h
\paragraph{abc}
text text text text text text text text text text ... text
text text text !!text text text text text text text ... text
text text text text text text text text text text ... text
text text text text text text text text text text ... text
\end{document}
If you push the text down 1 line:
\documentclass{article}
\setlength\textheight{5cm}
\begin{document}
a\\b\\c\\d\\e\\f\\g\\h\\i
\paragraph{abc}
text text text text text text text text text text ... text
text text text !!text text text text text text text ... text
text text text text text text text text text text ... text
text text text text text text text text text text ... text
\end{document}
TeX does not break between the abc heading and the !! line, it takes the whole thing over including the heading:
Note to do this it has to be allowed to stretch the white space enough to account for the line taken over. The stretchy space of the paragraph heading itself and.or between paragraphs should be enough, but it all depends on what class and settings you have used, but haven't revealed.
abc
.) As always you should provide a complete document that shows the problem.\paragraph
is an inline heading and the referenced question is about\section
which is a display heading. the situations are not unconnected, but not the same either.\clubpenalty
set rather low, and no stretch allowed in the space before\paragraph
. not nearly enough is known to be able to answer this question in its present form.