I followed the example from here Two figures side by side to create the following code:
\documentclass{amsbook}
\usepackage{graphicx}
\usepackage{caption}
\begin{document}
\begin{figure}
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=0.8\textwidth]{pics/NormalCalc1}
\caption{Fig 1}
\end{minipage} \hfill
\begin{minipage}{0.5\textwidth}
\centering
\includegraphics[width=0.8\textwidth]{pics/NormalCalc2}
\caption{Fig 2}
\end{minipage}
\end{figure}
\end{document}
But I get the following output. I can't see what I'm doing wrong (the example in the post clearly worked!).

\end{minipage}\hfillnot\end{minipage} \hfilland used{0.45\textwidth}not{0.5\textwidth}to leave some space between – David Carlisle Sep 27 '23 at 19:26