iPhone 15 has a 48 MP sensor, just like the iPhone 14. So they're doing some weird downscaling to get it to 24MP. (iPhone 15 saves photos as 24MP by-default, but I don't think that makes it native 24MP.)
The iPhone 14 cut the width and height in half with pixel binning to produce 12 MP images from the 48 MP sensor. I kind of thing the change in iPhone 15 was more to get more sales with a bigger megapixel number than to try to improve the quality of our photos. And maybe it's also to waste our storage space faster to encourage us to get iCloud