Suppose that $N$ is a geometric random variable with parameters $p \in (0,1)$ and its support is $\mathbb Z^{\ge0}$.
Let $\{X_k\}_{k\in \mathbb{Z}^+}$ be a sequence of independent bernoulli random variables independent of $N$.
Let $$\qquad Y=\sum_{k=1}^N X_k.$$
If we want to findthe generating function $P_Y$ of $Y$, do we always need to set $P(N=k) = q^{k-1}p , k\ge1$?
A textbook makes this adjustment in an example, but my professor does not do this adjustment in solving another problem, and sometimes my professor uses $\sum_{k=0}^N$, so I am confused.
If you are confused about what my question is, here are two examples:


There are two morally equivalent, but slightly different, ways to define a geometric random variable. The setup is the same for both: we are repeating independent Bernoulli trials until the first time we encounter something designated as a "success" (which has probability $p$ on each trial).
or
The top source you cited chooses route 1, and the bottom source chooses route 2. The difference between the routes is (a) important, (b) annoying, and (c) totally uninteresting. Which one an author chooses is simply a matter of convention and nothing more. An author's job is to make this choice explicit somewhere, and reader's job is to find that declaration and proceed from it.
Note that the Wikipedia article on geometric variables acknowledges both approaches, and in fact, repeats all its calculations for both scenarios.