How to align mesh parts?
Use Snapping.
Select the vertices you want to move.
Enable snapping (magnet icon) and set it to Snap to Vertices.
In a lateral Orthographic view move the vertices you want to align.

Other tools to be aware of:
Scaling to zero.
Select all of the vertces and scale to $0$ on the axis you need.
In this example all of the vertices are scaled on the z axis, this is done pressing SZ$0$:

For a more precise alignment, copy the coordinates of a vertex in a given axis, and make the selected vertices be at such coordinates using the Item &gt; Transform tab.
You can set the coordinates to global.

To copy and paste values, just move the cursor over to the value you want to copy and press Ctrl+C to copy and
Ctrl+V to paste