The earth isn’t a perfect sphere - it’s squished at the poles and bulging at the equator
The earth’s size and shape is modelled by datums like WGS84
Other datums exist for specific uses (ITRS/ITRF, high-precision), NAD83 for North America, etc.