Lets start by considering the partition function for a single spin.
We are in the canonical ensemble. We have constant $N$, constant $H$ and constant $T$. In the canonical ensemble for a (quantum) system that
occupies a discrete set of levels we have:
\[
Z_c(N,H,T) = \sum_i e^{-\beta E_i}
\]
For a single spin this is simply:
\[
Z_c(1,H,T) = \sum_{s_1=0}^1 e^{-\beta z(s_1) \mu H} = e^{\beta \mu H} + e^{-\beta \mu H} = 2 \cosh(\beta \mu H)
\]
where here $z(s_1)$ is a function for which $z(0)=-1$ and $z(1)=1$.
Let's now consider a system with $N$ spins. We now will have multiple summation signs in our expression for the
partition function as shown below:
$$
Z_c(N,N,T) = \sum_{s_1=0}^1 \sum_{s_2=0}^1 \sum_{s_3=0}^1 \dots \sum_{s_N=0}^1 \exp\left(\beta \sum_{j=1}^N z(s_j)\mu H\right)
$$
The first sum here run over the two spin states the first spin can take, the second sum runs over the two spins the second spin
can take, the third runs over the three spin states the third spin can take and so on. Once again $z(s)$ is a function for which
$z(0)=-1$ and $z(1)=$. We progress with this problem by recognising that the exponential of a sum in the final term can be rewritten
as a product of exponentials as shown below:
$$
Z_c(N,N,T) = \sum_{s_1=0}^1 \sum_{s_2=0}^1 \sum_{s_3=0}^1 \dots \sum_{s_N=0}^1 \prod_{j=1}^N e^{z(s_j) \mu H}
$$
Each of the terms in this product depends on only one of the spin variables. We can thus rewrite the following sum over products as
shown below:
$$
Z_c(N,N,T) = \left[ \sum_{s_1=0}^1 e^{z(s_1) \mu H} \right] \left[ \sum_{s_2=0}^1 e^{z(s_2) \mu H} \right] \left[ \sum_{s_3=0}^1 e^{z(s_3) \mu H} \right] \dots \left[ \sum_{s_N=0}^1 e^{z(s_N) \mu H} \right]
$$
Notice that each of the sums in the above is the result is the same as the single spin parition function , $Z_c(1,H,T)$, which
we derived above. We can thus write:
$$
Z_c(N,H,T) = 2^N \cosh^N(\beta \mu H)
$$