I understood that for finding a distance between a plane and a point we first find a vector between a point on a plane and the given point and then take the projection on the normal vector.
Is $D=\frac{|{Ax_0+By_0+Cz_0-D}|}{\sqrt{A^2+B^2+C^2}}$ is the same? as ${Ax_0+By_0+Cz_0-D}$ is not the dot product with $\frac{N}{|N|}$ it seems that we put the point into the equation of the plane (but the point does not have to be on the plane).
$\newcommand{\dist}{\operatorname{dist}}$The distance between the plane $\pi:Ax+By+Cz+D=0$ and a point $p:(x_0,y_0,z_0)$ is given by $$\dist(\pi,p)=\frac{|{Ax_0+By_0+Cz_0\color{red}{+}D}|}{\sqrt{A^2+B^2+C^2}}.$$
As you mention, you need to take a point $(x,y,z)$ from the plane and take the projection on the normal direction of the vector from that point to the given $(x_0,y_0,z_0)$ one, that is, of vector $$\vec{u}=(x_0-x,y_0-y,z_0-z).$$ A normal unit vector is $\frac{\vec{n}}{|\vec{n}|}$, where $\vec{n}=(A,B,C)$. Then $$\dist(\pi,p)=\left|\frac{\vec{n}}{|\vec{n}|}\cdot \vec{u}\right| = \frac{\left|A(x_0-x)+B(y_0-y)+C(z_0-z)\right|}{\sqrt{A^2+B^2+C^2}}.$$ Since $(x,y,z)$ is on the plane, it satisfies $Ax+By+Cz=-D$. Using that in the numerator: $$\dist(\pi,p)= \frac{\left|Ax_0+By_0+Cz_0-(Ax+By+Cz)\right|}{\sqrt{A^2+B^2+C^2}}= \frac{\left|Ax_0+By_0+Cz_0+D\right|}{\sqrt{A^2+B^2+C^2}}.$$