JPEG is essentially for people who don't know that JPEG is a crappy image format, but it's the one they recognize. HEIF is a newer Apple lossless format that is somewhat like RAW.
As you go down the chain of photo apps (not just editors like Photoshop, GIMP or others), many low cost items like greeting card apps don't understand anything but JPEG or PNG. And then only RGB. They don't know what to do with a grayscale, CMYK or Lab image.
So, in that respect, JPEG simplifies the image format for simple, poorly written apps. But then you're instantly giving up image quality to shoot JPEG. Better to use the higher quality format for your master image library and then save a copy out to JPEG for such apps only when you need one.
If you really want the best overall quality possible from your iPhone, go to Settings > ProRAW & Resolution Control and turn that on. Then underneath that for Pro Default, use ProRAW Max (up to 48 MP).
This will shoot (not under all conditions) a DNG image, which is a generic RAW format Adobe created some years back and has been trying to get all digital camera makers to use so they can stop the madness of having to constantly add new camera RAW profiles, every time a new digital camera that can shoot RAW comes out.
With DNG or HEIF, you don't have to do any editing afterwards, as long as the apps you're using can open either format, but you'll be very glad you shoot in either of these formats when you realize how much greater latitude you have to fix a poor shot.