It is a deeper question than some might suppose:
The idea has more recently been given a modern formulation by Max Tegmark who called it the Mathematical Universe Hypothesis.
Tegmark’s hypothesis is actually more, shall we say, grandiose. He doesn’t just claim that actually reality is math but that all math is real. Not just the math that we use in the theories that describe our observations, but all of it. The exponential function, Mandelbrot sets, the number 18, they’re all real as you and I. If you believe Tegmark.
But should you believe Tegmark? Well, as we have seen earlier, the justification we have for calling some mathematical structures real is that they describe what we observe. This means we have no rationale for talking about the reality of mathematics that does not describe what we observe, therefore the mathematical universe hypothesis isn’t scientific. This is generally the case for all types of the multiverse. The physicists who believe in this argue that unobservable universes are real because they are in their math. But just because you have math for something doesn’t mean it’s real. You can just assume it’s real, but this is unnecessary to describe what we observe and therefore unscientific.Sabine Hossenfelder, “Are we made of math? Is math real?[article title]” at BackRe(Action)
There is mathematics to prove that the universe is shaped like a leprechaun’s hat.
All that said, a bigger question looms. We are able to understand mathematics but why are we? Something is missing from a discussion of whether math is real apart from that.