Could you tell me how can I force a figure with subfigures such as this
\centering
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Test 1.png}
\caption{Some caption}
\label{fig:Test 1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.45\textwidth}
\centering
\includegraphics[width=\textwidth]{figures/Test 2.png}
\caption{Some caption}
\label{fig:Test 2}
\end{subfigure}
\caption{Some caption}
\label{fig:Some label}
\end{figure}
to appear in the page where I want it to, and then have some text after it.
I have tried the obvious [h] option, but that produced errors. I’m using the Harvard thesis template with Overleaf.
I end up with a page made of a figure with two subfigures plus another such figure, and I would like to have at one figure with some figures, then some text, and the next page again a figure with subfigures and some text.
How much does text/paragraph size affect this?
Maybe I fill have to use something like \newpage before a paragraph or figure to have placements I would like?
How could I also rewrite this code and use a newer package, since I’ve just found out that subfigure is deprecated?
Thank you so much!

\begin{figure}[ht]and use article document class this image appear where is inserted in text. Of course, if there is enough space for it, otherwise it migrate to the top of the next page. If you have problems with showed code fragment, the problem is not in it but in part document, which is unknown to us. Please, extend your code fragment to complete small document, which reproduce your problem. – Zarko Nov 11 '20 at 16:54