What is the difference between least squares method and mean squared method in calculating the error? I think I am a little bit confused between the LSE (Least Squared Error) and the MSE (Mean Squared Error). So how can these two methods differ in calculating the error of the linear regression model?
And if available, please provide the mathematical equation of both methods.

The least squares method aims to minimize:
$$
\sum_{i = 1}^n\bigg(
y_i - \hat y_i
\bigg)^2
$$
Here, $n$ is the number of observations, the $y_i$ are the observed values of $Y$ (all $n$ of them), and the $\hat y_i$ are the predicted values of $Y$ (all $n$ of them). By calculus, this is equivalent to minimizing the following, even though the two will have different values of their respective minima.
$$
\dfrac{1}{n}\sum_{i = 1}^n\bigg(
y_i - \hat y_i
\bigg)^2
$$
In other words, both expressions will achieve their minima for the same $\hat y_i$ values, even though those minimum values are different.
The second expression is the mean squared error: $$MSE=
\dfrac{1}{n}\sum_{i = 1}^n\bigg(
y_i - \hat y_i
\bigg)^2
$$
