The figure I've inserted has a whole page to itself, it is in the middle of the page with two large blank gaps above and below. The text on the previous line ends near the bottom of the previous page so I assumed the figure would start at the top of the next page. Here is what I've written:
\begin{figure}
\captionsetup[subfigure]{justification=centering}
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width=.4\linewidth]{images/a1.png}
\caption{a}
\label{subfig1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
\centering
\includegraphics[width=.4\linewidth]{images/a2.png}
\caption{b}
\label{subfig2}
\end{subfigure}
\caption[abc]{abc}
\label{fig1}
\end{figure}
When I write text after \end{figure} it appears on the previous page next to the text I wrote before the figure. I want the figure to appear at the top of the page and any text I write after it to appear below the figure. I've tried \begin{figure}[h] and \begin{figure}[t] but neither works.
Picture of whats happening is below, using report document class with no options.

Heres a 'Minimum Working Example' as requested:
\usepackage[utf8]{inputenc}
\usepackage{titlesec}
\usepackage{hyperref}
\usepackage{array}
\usepackage{amsmath,amsthm}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[parfill]{parskip}
\usepackage{lipsum}
\theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\begin{document}
\begin{titlepage}
\centering
\vspace*{1cm}
\Huge
\textbf{Title}
\vspace{1.5cm}
\huge
\textbf{Author}
\vspace{5cm}
\Large
Supervised by Professor
\vspace{1cm}
\large
Department\\
University
\end{titlepage}
\addcontentsline{toc}{chapter}{Abstract}
\newpage
\chapter*{\centering Abstract}
\tableofcontents
\addcontentsline{toc}{chapter}{Introduction}
\listoffigures
\newpage
\chapter*{Introduction}
\newpage
\chapter{Chapter 1}
\lipsum[66]
\section{Section 1.1}
\lipsum[66]
\lipsum[67]
We can see that the following two properties hold:
\begin{enumerate}
\item Property 1
\item Property 2
\end{enumerate}
\section{Section 1.2}
\lipsum[66]
\begin{definition}[Definition 1]
etc.
\end{definition}
Example:\
[ \begin{array}{c|cccc}
\text{Bit}&2^3 &2^2 &2^1 &2^0\ \hline
8 &1 &0 &0 &0\
9 &1 &0 &0 &1\ \hline
1 &0 &0 &0 &1\ \hline
\end{array} ]
\lipsum[66]
Theorem below
\begin{theorem}
\label{thm1}
Theorem
\end{theorem}
\begin{proof}
Proof
\begin{flalign}
s &= 0 \oplus s \nonumber \
&= r \oplus r \oplus s && \text{(By first sentence)} \nonumber \
&= r \oplus (a_1 \oplus a_2 \oplus \cdots \oplus a_n) \oplus
(b_1 \oplus b_2 \oplus \cdots \oplus b_n) \nonumber \
&= r \oplus (a_1 \oplus b_1) \oplus \cdots \oplus (a_n \oplus b_n) \nonumber \
&= r \oplus a_k \oplus b_k && \text{(Again by first sentence)} \nonumber
\end{flalign}
\lipsum[66]
\begin{flalign}
s &= r \oplus a_k \oplus b_k \nonumber &\
&= r \oplus a_k \oplus r \oplus a_k \nonumber &\
&= r \oplus r \oplus a_k \oplus a_k \nonumber &\
&= 0 \nonumber
\end{flalign}
\lipsum[66]
\end{proof}
\lipsum[66]
\chapter{Chapter 2}
\lipsum[66]
\section{Section 2.1}
\lipsum[66]
\lipsum[66]
\begin{figure}[ht] %
\captionsetup[subfigure]{justification=centering}
\centering
\setkeys{Gin}{width=\linewidth}%
\begin{subfigure}{.45\textwidth}%
\includegraphics{image.png}
\caption{a}
\label{subfig1}
\end{subfigure}%
\hfil
\begin{subfigure}{.45\textwidth}%
\centering
\includegraphics{image.png}
\caption{b}
\label{subfig2}
\end{subfigure}
\caption[abc]{abc}
\label{fig1}
\end{figure}
\bibliographystyle{plain}
\bibliography{refs}
\end{document}


\begin{figure}[!tp]? If it doesn't work, it means that the figure is really too high for being placed top. – egreg Jan 31 '23 at 15:20variorefthat might add “on the facing page” or similar, if you prefer. Don't worry about the placement of figures until the text is in final form: you just lose time, because typically changes to the text destroy that work. – egreg Feb 01 '23 at 18:17[H]etc. was for but they don't work here? maybe if I just add a few line breaks and then write my text that will appear as I described? – Max Feb 01 '23 at 18:29\\\\on the last line appears as I wanted, thanks! – Max Feb 01 '23 at 18:37