I have tried everything. When I run this in overleaf I get (??) but I'm also able to click the (??) to get to the figure in my pdf so clearly the machine understands what I'm referencing but it doesn't give me the number.
The figure (\ref{fig:20_25A}).
\begin{figure}[!h]
\centering
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/200.png}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/205.png}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/210.png}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/215.png}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/220.png}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/225.png}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/230.png}
\end{subfigure}
\begin{subfigure}[b]{0.49\textwidth}
\includegraphics[width=\textwidth]{TaskB_20-25/235.png}
\end{subfigure}
\label{fig:20_25A}
\end{figure}
It should be a number but it isn't. Why and how do I fix it. I've tried changing the label, its position in the figure code, and much more.
\caption{...}. Latex can't reference figures, it can only reference the numbered captions within the figure.