There are more efficient formats like JPEG-XL, HEIF and WebP. If you convert the RAW -> JPEG -> WebP you are losing more quality. I think iPhone uses HEIF format.
In some scenarios the iPhone will ask you (which is good) whether you want to share the photo as is or convert it to jpeg like yesterday when I tried to send a photo on telegram as a file to avoid the unwanted recompression