Take the $ p^{\text{th}} $ cyclotomic ring of integers, the homomorphism $ \sigma:\zeta\to\zeta^\gamma $ with some primitive root $ \gamma $ modulo $ p $. Circle divisions and the drawing of regular polygons was very popular in $ 19^{\text{th}} $ century mathematics. Many great names are attached to it. Jacobi (and independently Gauss and Cauchy) found the cyclotomic integer $ \omega_{q,i}(\zeta) $, $ q\equiv1\pmod{p} $, the so-called Jacobi cyclotomic function, that only factorizes to prime ideals lying over the prime $ q $ and that factorizes either to the prime ideal $ \langle q,\sigma^j\psi_q(\zeta)\rangle $ or the prime ideal $ \langle q,\sigma^{j+\mu}\psi_q(\zeta)\rangle $ with $ \mu=(p-1)/2 $ but it does not factorize to both. We only note here that the second generator $ \psi_q(\zeta) $ of the prime ideal $ \langle q,\sigma^j\psi_q(\zeta)\rangle $ was found by Kummer. Kummer had the idea of choosing exponents $ z_i\in\mathbb{Z} $ such that
\begin{equation*}
\left\lbrace q\cdot\dfrac{\langle q,\sigma^0\psi_q(\zeta)\rangle}{\langle q,\sigma^{\mu}\psi_q(\zeta)\rangle}\right\rbrace^{h_0}=\left\langle\prod_i\omega_{q,i}^{z_i}(\zeta)\right\rangle,\quad h_0\in\mathbb{N}_0.
\end{equation*}
If the prime ideal $ \langle q,\sigma^0\psi_q(\zeta)\rangle $ is principal, there exists a cyclotomic integer $ g(\zeta) $ such that
\begin{equation*}
\left\langle g(\zeta)\right\rangle=q\cdot\dfrac{\langle q,\sigma^0\psi_q(\zeta)\rangle}{\langle q,\sigma^{\mu}\psi_q(\zeta)\rangle}
\end{equation*}
with $ \langle q,\sigma^{\mu}\psi_q(\zeta)\rangle\mid \langle q\rangle $ and there exists a unit $ \varepsilon $ such that
\begin{equation*}
\varepsilon\cdot g^{h_0}(\zeta)=\prod_i\omega_{q,i}^{z_i}(\zeta).
\end{equation*}
Kummer could compute this unit to $ \varepsilon=(-\zeta)^k $ with some integer $ k $. We apply another method of Kummer, that he used in order to prove that the class number of the $37^{\text{th}} $ real cyclotomic ring of integers is not divisible by the prime $ p=37 $, and take the power of $ n $ such that $ (-\zeta)^{kn}=1 $ and $ h_0n=r-1 $ hold for some prime $ r\equiv1\pmod{p} $. By group theory we have
\begin{equation*}
\left\lbrace (-\zeta)^k\cdot g^{h_0}(\zeta)\right\rbrace^n=g^{h_0n}(\zeta)=g^{r-1}(\zeta)\equiv1\pmod{\langle r,\sigma^j\psi_r(\zeta)\rangle}
\end{equation*}
for any conjugate prime ideal $ \langle r,\sigma^j\psi_r(\zeta)\rangle $ in the multiplicative group of the quotient field $ \mathcal{O}_{\mathbb{Q}[\zeta]}/\langle r,\sigma^j\psi_r(\zeta)\rangle $ with order $ r-1 $. Now, if
\begin{equation*}
\left\lbrace\prod_i\omega_{q,i}^{z_i}(\zeta)\right\rbrace^n\not\equiv1\pmod{\langle r,\sigma^j\psi_r(\zeta)\rangle}
\end{equation*}
the prime ideal $ \langle q,\sigma^j\psi_q(\zeta)\rangle $ cannot be principal.
Now take the $37^{\text{th}}$ cyclotomic ring of integers, the homomorphism $\sigma:\zeta\to\zeta^2$ with the primitive root $2$ modulo $37$. Incongruence is given for $ h_0=37 $, $ q=149 $, $ r=5477=4\cdot37^2+1 $ and every conjugate prime ideal $ \langle r,\sigma^j\psi_r(\zeta)\rangle $, thus, the prime ideals lying over the prime $ 149 $ are not principal. Kummer's class number formula gives for the first factor $ 37 $ and the second factor can be determined to $ 1 $ by the Minkowski bound in the real cyclotomic ring of integers, thus, the prime ideals lying over the prime $ 149 $ have class order $ 37 $.
Now take the cylotomic integer $g(\zeta)=-\zeta^{13}+\zeta^{25}+\zeta^{27}+\zeta^{30}+\zeta^{32}$ in the $37^{\text{th}}$ cyclotomic ring of integers. The ideal $\langle g(\zeta)\rangle$ factorizes to $\langle g(\zeta)\rangle=\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2}\cdot\langle149, \sigma^{11}\psi_{149}(\zeta)\rangle$. The cyclotomic integer $$h(\zeta)=\zeta-\zeta^{4}-\zeta^{7}-\zeta^{8}-\zeta^{9}-\zeta^{11}-\zeta^{12}-\zeta^{13}-\zeta^{14}-\zeta^{15}+\zeta^{16}-\zeta^{18}-\zeta^{19}+\zeta^{21}-\zeta^{22}-\zeta^{23}-\zeta^{24}-\zeta^{25}-\zeta^{26}-\zeta^{28}-\zeta^{29}-\zeta^{30}-\zeta^{33}+\zeta^{36}$$ factorizes to $\langle h(\zeta)\rangle=\langle149, \sigma^{11}\psi_{149}(\zeta)\rangle\cdot\langle149, \sigma^{29}\psi_{149}(\zeta)\rangle$. The two factorizations give the class equivalence $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2}\sim\langle149, \sigma^{29}\psi_{149}(\zeta)\rangle$. We square this equivalence and get
$${\left\langle149, \sigma^{0}\psi_{149}(\zeta)\right\rangle^{4}}\sim\left\{\left\langle149, \sigma^{0}\psi_{149}(\zeta)\right\rangle^{2}\right\}^2\sim
{\left\langle149, \sigma^{29}\psi_{149}(\zeta)\right\rangle^2}\sim
{\sigma^{29}\circ\left\langle149, \sigma^{29}\psi_{149}(\zeta)\right\rangle}\sim
{\left\langle149, \sigma^{2\cdot29}\psi_{149}(\zeta)\right\rangle}.$$
Consecutively squaring gives
$$\tag{1}\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2^k}\sim\langle149, \sigma^{29k}\psi_{149}(\zeta).$$
With $\sigma^{36}=\sigma^0\equiv\text{id}$ we get $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2^{36}}\sim\langle149, \sigma^{0}\psi_{149}(\zeta)$. We take the letter $ I $ for the principal class and finally obtain $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2^{36}-1}\sim I$. Therefore the class order of the prime ideal $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle$ divides the integer $2^{36}-1$.
Now we take the cyclotomic integer $s(\zeta)=\zeta-\zeta^{4}-\zeta^{17}+\zeta^{25}-\zeta^{27}-\zeta^{34}$. It factorizes to $\langle s(\zeta)\rangle=\langle149, \sigma^{12}\psi_{149}(\zeta)\rangle\cdot\langle149, \sigma^{26}\psi_{149}(\zeta)\rangle\cdot\langle149, \sigma^{27}\psi_{149}(\zeta)\rangle$. With $24\cdot29\equiv12\pmod{36}$ we first get $\sigma^{24\cdot29}=\sigma^{12}$ and equivalence ($1$) gives the equivalence $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2^{24}}\sim\langle149, \sigma^{12}\psi_{149}(\zeta)\rangle$. Similarly we get $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2^{22}}\sim\langle149, \sigma^{26}\psi_{149}(\zeta)\rangle$ and $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2^{27}}\sim\langle149, \sigma^{27}\psi_{149}(\zeta)\rangle$. This yields
$${\left\langle149, \sigma^{12}\psi_{149}(\zeta)\right\rangle\cdot\left\langle149, \sigma^{26}\psi_{149}(\zeta)\right\rangle\cdot\left\langle149, \sigma^{27}\psi_{149}(\zeta)\right\rangle}\sim
{\left\langle149, \sigma^{0}\psi_{149}(\zeta)\right\rangle^{2^{24}}\cdot\left\langle149, \sigma^{0}\psi_{149}(\zeta)\right\rangle^{2^{22}}\cdot\left\langle149, \sigma^{0}\psi_{149}(\zeta)\right\rangle^{2^{27}}}\sim
{\left\langle149, \sigma^{0}\psi_{149}(\zeta)\right\rangle^{2^{24}+2^{22}+2^{27}}}\sim I.$$
Hence the class order of the prime ideal $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle$ divides the integer $2^{24} + 2^{22} + 2^{27}$. But then the class order of the prime ideal $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle$ divides the greatest common divisor $\gcd (2^{36}-1, 2^{24} + 2^{22} + 2^{27}) = 37$. Kummer's class number formula is $37$ so that we have confirmed this class order by the factorization of cyclotomic integers! We finally get $\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{2^{5}}\sim\langle149, \sigma^{0}\psi_{149}(\zeta)\rangle^{32}\sim\langle149, \sigma\psi_{149}(\zeta)\rangle$ with $5\cdot29\equiv1\pmod{36}$. The integer $\xi=2^5=32$ is a primitive root modulo $37$. Therefore there are $36$ prime ideals
$$\tag{2}\sigma^n\left\langle149, \sigma^0\psi_{149}(\zeta)\right\rangle=\left\langle149, \sigma^n\psi_{149}(\zeta)\right\rangle\sim\left\langle149, \sigma^0\psi_{149}(\zeta)\right\rangle^{32^{n}},\quad n=0,\dots,35,$$
and each occupies a different class of the $36$ non-principal classes.
The exponent $f$ of a prime $q$ modulo the prime $p$ is the least positive integer $f$ such that $q^f\equiv1 \pmod{p}$. This is also the order $ f=\text{ord}\,q\pmod{p} $. Kummer already knew that a prime $q$ with exponent $f$ modulo $p$ factorizes to $e=\frac{p-1}{f}$ prime ideals $\langle q, \sigma^k\psi_{q}(\zeta)\rangle$,$0\le k<e$, with $\langle q, \sigma^k\psi_{q}(\zeta)\rangle=\langle q, \sigma^{k+e}\psi_{q}(\zeta)\rangle$. Then all prime ideals lying over a prime $q$ with an exponent $f>1$ must be principal because otherwise the homomorphisms $\sigma^0,\sigma^e,\sigma^{2e},\dots,\sigma^{e(f-1)}$ would send the prime ideal
$${\left\langle q, \sigma^{0e}\psi_{q}(\zeta)\right\rangle}=
{\left\langle q, \sigma^{e}\psi_{q}(\zeta)\right\rangle}=
{\left\langle q, \sigma^{2e}\psi_{q}(\zeta)\right\rangle}=\dots=
{\left\langle q, \sigma^{(f-1)e}\psi_{q}(\zeta)\right\rangle}$$
to distinct classes because
- the prime ideal $ \langle q, \sigma^{0e}\psi_{q}(\zeta)\rangle $ must be in the same class of one of the $ 36 $ conjugate prime ideal $ \langle149, \sigma^{j}\psi_{149}(\zeta)\rangle $, $ j=0,\dots,35 $, and
- the prime ideals $ \langle149, \sigma^{j}\psi_{149}(\zeta)\rangle $, $ \langle149, \sigma^{j+e}\psi_{149}(\zeta)\rangle $ are in different classes.
Therefore only prime ideals lying over a prime q with order $f=1$ can be non-principal. If a prime ideal is not principal one conjugate prime ideal $\langle q, \sigma^{k}\psi_{q}(\zeta)\rangle$ must be equivalent to the prime ideal $\langle 149, \sigma^{0}\psi_{149}(\zeta)\rangle$ and the class group is well understood.
A detailed approach to these mysterious determinants $ h_0 $, as Kummer and Gauss put it, can be taken from section $ 6.10 $, here or here. Chapter $ 21 $ contains the class groups of all $ p^{\text{th}} $ cyclotomic rings of integers for odd primes $ p\leq71 $.