The difference in quality of the images taken with my iPhone 6s and my son's iPhone 12 is readily apparently.
Likely mostly down to better software and a bit larger sensor.
I can see the difference between my 13 Pro and 14 Pro 48MP mode too. But it comes at the cost of a larger camera.
If they were to do the same trick with the longest lens camera on the phone they would either have to go with the IQ impairing bent optical path or have a comically long lens protruding
In short, the sensor isn’t better “per pixel”.
The 48MP mode on the 14 Pro doesn’t even begin to touch a 24MP camera with a 24mm lens either.