It's in mentioned in my professor's slides that $S^2$ is the population variance and $S^2$ = $$\sum_{i=1}^N Y_i^2 - \frac{(\sum_{i=1}^N Y_i)^{2}}{N} \over {N-1} $$ which is estimated by $s^2$ which is an unbiased estimator for $S^2$ and it's later mentioned that $S^2 ≅ \sigma^2$ as population size increases and I am so confused if $S^2$ is the population variance, why are we dividing by $N-1$, should not it be just $N$? and if $S^2$ is already the population variance, then what is $\sigma^2$ supposed to indicate?
Thanks in advance.
Your professor may have used $S^2$ instead of $\sigma^2$ or instead of $s^2$, perhaps at different times. Your first expression is for the sample variance.
A common convention is to define the population variance as $$\sigma^2 = \mathbb E[(Y-\mathbb E[Y])^2]= \mathbb E[Y^2] -(\mathbb E[Y])^2$$ and the sample variance as $$s^2=\frac{1}{N-1}\sum_{i=1}^N \left(Y_i - \frac1N\sum_{j=1}^N Y_j\right)^2 = \frac{1}{N-1}\sum_{i=1}^N \left(Y_i^2\right) - \frac{1}{N(N-1)}\left(\sum_{j=1}^N Y_j\right)^2 $$
This $s^2$ is unbiased estimator of $\sigma^2$, thanks to the $\frac1{N-1}$ term called Bessel's correction. If $\frac1N$ was used instead then you would have slightly biased estimator of the population variance; for a normal distribution it would be the maximum likelihood estimator.