There are many books relating to the Pythagorean theorem $(A^2+B^2=C^2)\,$ and the special case of Pythagorean triples where $A,B,C\in\mathbb{N}.$
Some of the books in my library are
PYTHAGORAS' THEOREM The Sacred Geometry of Triangles by Claudi Alsina
The Pythagorean Triangle: Or the Science of Numbers by George Oliver
A Pythagorean Introduction to Number Theory: Right Triangles, Sums of Squares, and Arithmetic (Undergraduate Texts in Mathematics) by Ramin Takloo-Bighash
Pythagorean triangles by Waclaw SIERPINSKI
You may find others in your local library but here is a summary of the little you might glean from them to answer your question.
There may be primitive and/or imprimitive solutions to $\space a^2+b^2= z_o^2.\quad $ All valid $z_0$-values are of the form $4k+1$ but not all $4k+1$ values are valid. $\space$
A list of valid primitive $z_0$-values is shown in the Online Encyclopedia of Integer Sequences. $\space$ If a number is shown more than once, it means there is more than one solution for that number.
The number of primitive solutions for any given $z_0$ is $2^{n-1}$ where $n$ is the number of distinct prime factors of $z_0.\space$
For example, $\space $ given $65=5\times13,\space$
there are
$2^{2-1}=2\space$ solutions:
$\quad(33,56,65)\qquad
(63,16,65).$
Whereas, $z_0=125=5\times5\times5\space$ has only $2^{1-1}=2^0=1\space $ primitive solution. There are
$\quad (75,100,125)\space\text{ and }\space
(117,44,125)\quad $ but the first is imprimitive.
For solutions given $z_0$ we use a formula with
$(x,y,z)=(A,B,C),\space$ one which generates a valid triple for every pair of natural numbers
$(m>k).$
$$ \qquad A=m^2-k^2\qquad B=2mk \qquad C=m^2+k^2\qquad$$
We now solve the $C$-function for $k$ and test a defined range of $m$-values to see which, if any, yield integers. We demo with $\quad C=1105=5\times13\times17\space \text{suggesting}\space 2^{3-1}=4\quad $ solutions.
\begin{equation}
C=m^2+k^2\implies k=\sqrt{C-m^2}\\
\text{for}\qquad
\bigg\lfloor\frac{ 1+\sqrt{2C-1}}{2}\bigg\rfloor \le m \le \big\lfloor\sqrt{C-1}\space\big\rfloor
\end{equation}
The lower limit ensures $m>k$ and the upper limit ensures $k\in\mathbb{N}$.
$$C=1105\implies
\bigg\lfloor\frac{ 1+\sqrt{2*1105-1}}{2}\bigg\rfloor=24 \le m \le
\big\lfloor\sqrt{1105-1}\space\big\rfloor=33\\
\land \quad m\in\big\{24,31,32,33\big\}\implies k\in\big\{23,12,9,4\big\}\\$$
$$
f(24,23)=(47,1104,1105)\quad
f(31,12)=(817,744,1105)\\
f(32,9)=(943,576,1105)\quad
f(33,4)=(1073,264,1105)\
$$