Can't we just use PCA to solve the problem of Linear Regression

From my intuitive understanding till now If I have let's say a set of 2D points, then performing the PCA will give me the direction that reduces the variance along one direction drastically right. But isn't this also the purpose of Linear Regression. To basically reduce the distance of the points from the line.
PCA vs Linear Regression Image

enter image description here


In linear regression, we assume that there is no error in the $x$-direction.

In linear regression, the errors are the vertical distance to the line squared and not the closest distance to the point.