In the Swedish equivalent of a calculus class, I came across various notations for derivatives, including: Lagrange's $f'(x)$, Newton's $\dot{x}$, and Leibniz's $\frac{dy}{dx}$. For second-order these become $f''(x)$, $\ddot{x}$, and $\frac{d^2y}{dx^2}$ respectively (as you already may know) and it is the last notation $\frac{d^2y}{dx^2}$ that has left my mind boggled, since I haven't found any visualization of it nor finding why just the $d$ is squared in the numerator.
My intuition when I first saw it was that it might make more sense to square the entire fraction as you take the quotient of $y$ and $x$ twice. However that is just what my gut felt like, and I found no further clarification in the textbook.
So to summarize, if anyone has a neat explanation or some sort of visualization of why the notation is as it is, I would appreciate it.