I am solving about principal component analysis (PCA) and I stumbled upon a place where I need to calculate the covariance matrix, I am seeing varieties of formula. Here are some that I have found:

The $n$ or $n-1$ is confusing me. What is the correct formula?
This source solves using $n$, whereas this video solves using $n - 1$ in the denominator.
There is no correct or incorrect here.
The difference, $n-1$, is called the Bessel's correction
It corrects the bias in the estimation we do about the variance (we do not know the true population variance).
So I don't really see a place in statistics for the biased formula. When applying covariance, and thus also when doing PCA, I would go for the $n-1$ variant.
But to stress again: it's not a question of correct or incorrect. In probability theory, when calculating the variance of a discrete random variable, you don't want to apply the correction. So be careful to always go for on or the other whenever you are dealing with variance.