The search term you’re looking for is “tramming”
Tramming z axis
How I squared (trammed) my router
Tramming the primo