High efficiency (HEIF) is a modern compression algorithm that both does a better job preserving details and results in a smaller file. It also allows for a larger 16-bit color space instead of the 8-bit space allowed with a JPEG. Any iPhone camera from the iPhone 7 on captures “wide color” (display P3) images. These contain 10-bit color so your are automatically throwing color information away if you save it in Most Compatible (JPEG) format. HEIF also allows for non-destructive editing without having to save a new file each time. The only real downside to HEIF is that most of the rest of the world doesn’t use it. But, it’s not too hard to convert from HEIF to JPEG with an app.
Look at it this way, if you save your pictures in HEIF, you get all the benefits of better detail retention, full color reproduction, and a smaller file size while still retaining the
option to convert to JPEG at a later time. If you save straight to JPEG, there is no way to get back the detail and color information that is thrown away. And you’re left with a larger file at the same time.
See
this article for more.