Perfect lines and squares don’t exist as physical objects, sure, but geometry is less about material perfection than it’s about relationships. Nature constantly approximates geometric regularities because physics imposes them: energy minimization gives spheres, space-filling gives hexagons, angular momentum gives spirals.
Life didn’t need 4.5 billion years to “invent” geometry; geometry constrained life from the beginning. We only invented the formal language to describe it.