Let $X_1, X_2, X_3, \ldots \in \mathsf{Bernoulli}(\theta)$ be an independent collection of Bernoulli random numbers such that
\begin{equation}
N
\overset{d}{=} \min \left\{ K \in 0, 1, 2, \ldots : \sum_{k = 1}^K X_k = 1 \right\}
\end{equation}
We have
\begin{equation}
\{ N = n \}
= \{ X_1 = 0, X_2 = 0, \ldots, X_{n - 1} = 0, X_n = 1 \}
\end{equation}
Thus, by independence
\begin{equation}
\begin{split}
\mathbb{P} (N = n)
& = \mathbb{P} (X_1 = 0, X_2 = 0, \ldots, X_{n - 1} = 0, X_n = 1) \\
& = \left( \prod_{m = 1}^{n - 1} \mathbb{P}(X_m = 0) \right) \mathbb{P}(X_n = 1) \\
& = (1 - \theta)^{n - 1} \theta
\end{split}
\end{equation}
$\square$