Vector length output of discrete time convolution
The output $y$ is convolution of $x[n]$ and $h[n]$:

$$y[n]=\sum_{l=-\infty}^{l=+\infty} x[l]h[n-l]$$
As you said, let's assume only $h[0],\cdots,h[N-1]$ and $x[0],\cdots,x[M-1]$ are non-zero.


When $0\le l\le N-1$, then we have a non-zero $x[l]$.
Now consider $h[n-l]$. As long as $0 \le n-l \le M-1$, then we have a non-zero $h[n-l]$.


add up the sides of the two inequalities to get

$$0\le n\le N+M-2$$

as the set of indices where  $y[n]$ is nonzero. There are $N+M-2+1=N+M-1$ terms.