This is not what the cube square law means.
It means that body plans can’t simply be scaled up or down.
It does not mean that mammals like the elephants can’t evolve to grow bigger than they do today, just that it would require them to look differently.
The largest animal to ever live is alive today and is a mammal. The blue whale is bigger than any fish, reptile or any other type of animal alive today or in the past.
As far as land animals are concerned there are some really massive ones around today and some even bigger one that were alive in the past.
Extinct relatives of elephants like mammoths could grow to quite a large size and other weird ones like the Paraceratherium which was a relative of modern rhinos and big enough to be mistaken for a dinosaur at first glance when you see its skeleton on display in a museum.
We can’t actually be sure what the maximum size for a land based mammal would be under ideal conditions and with the right evolutionary pressure o get as big as possible.
They would look less and less familiar the bigger they grow since the familiar form don’t scale up right thanks to cube square law.
Hyraces are the closest living relatives of elephants, they are small and furry and look nothing like elephants. If a modern mammal evolved to be as much bigger as the elephant is to the hyrax they would likely look similarly different.
The evolutionary pressure and right conditions simply isn’t there though and might never return.
Latest Answers