It is fairly easy to construct a pretty accurate right angle using a divider to bisect a straight line with the limiting factors on accuracy being the straightness of your lines and the consistency of the arc length that your dividers can scribe (the accuracy of the arc length doesn't matter as long as it is consistent).
You can also use the angle between a horizontal line (achieved with a spirit level) and a vertical line (from a pendulum bob) to give you a right angle.
For flat surfaces and straight lines there are various methods a taunt wire being the simplest way to achieve a straight line. For flatness lapping can achieve better flatness than the tools used in the process. Similarly any liquid will form surface parallel to the surface of the earth under gravity which is actually pretty flat for most practical purposes, for example float glass is generally pretty flat and parallel just as a product of the manufacturing process.
A key thing here is that when you are talking about geometric tolerances eg flatness, straightness, parallelism, perpendicularity ect there are often various tricks you can exploit to get decent accuracy with quite simple tools with a bit of creativity.
another useful example is honing which essentially uses free floating abrasive blocks to 'average out' irregularities in a surface and can produce flatness/roundness much better than the tolerances of the tool itself.
Also don't discount the importance of the skill of individual craftsmen, especially in the contest of pre and proto industrial technology, medieval stone masons are quiet a good example of this.