From the Renaissance to the Enlightenment, Europeans are all about the geometric approach. The approach from Euclid. When Galileo says that the universe speaks in mathematics, he's thinking about geometry. When Newton writes the Principia, he does so following a geometric method. His fluxions, or calculus, would allow otherwise, but somehow it still seems proper to construct the concepts geometrically.
Of course this is not really Euclid, but the European reimagining of Euclid. And as algebras advance, so do new geometries. Fast forward to the end of the 18th century. Kant talks what we can know and what we can't. A priori knowledge is innate, what we know before experience, what he also calls analytic. Synthetic knowledge on the other hand comes from experience, what he calls a posteriori. But mathematics and geometry are something different. He calls them the synthetic a priori.
Like a priori knowledge, math is constructed in the mind, like synthetic knowledge it effectively describes the experienced world. This is no longer Galileo's geometrical accuracy in describing the universe, geometry is now a mental model that in turn permits an accurate description of the world.
Decades later, Gauss and Lobachevsky would make the first key steps towards questioning Euclid's parallel postulate and remaking geometry in a Non-Euclidean mold. Kant is at a crossroads - a last gasp for the Euclidean approach in Europe. Hume's skeptical empiricism leads him to doubt rational truths, yet the Euclidean system still epitomizes what is most rigorously true. So if it's not a Platonic fact, it's a psychological one.
This relativism allows one to ask again - what then is the structure of the real world? Perhaps there are other realist models - perhaps we can question again the basic axioms of Euclid. And so it began, starting from Kant, who creates one of the most cohesive defenses of Euclid's method, and also gives space to its strongest alternatives.