If you want to be able to watch/preview the HEIC images, you can edit the available mime type for Nextcloud's Viewer. (I do this to our company's NC so customers can use viewer for PDFs and employees can get previews/thumbnails of TIFFs, AIs and PSDs. For HEIC, just go to your NC's 'apps/viewer/js/viewer-main.js' and add 'image/heic' and 'image/heic-sequence' to the mimetype list (about halfway down, I hgihly recommend using VSCode+a formatter to make finding it easier)
It's a container for image data developed by Moving
Picture Experts Group ("MPEG", try to guess what else they have created).
While there are some compatibility issues between vendors HEIC still offers a greater set of features as compared to fx JFIF (you probably know it as JPEG/JPG.
Apple was one of the early adopters (2017) and (as usual?) the industry has followed.
Microsoft wants money for the codec in Windows and that's probably one of the reasons why it's not commonly used...yet.
You are missing the elephant in the room here that this format isn't royalty free and requires a license and is patented.
Same story with H.265 and AV1 in the video. AV1 is royalty free video codec while H.265 is patented so every device that transcodes or encodes to it should pay royalty fee to the patent holder, but due to the fact that H.265 predates AV1, a lot of devices still don't fully support AV1.
Also Apple are always supporting not open standards in their device making the whole interoperability a big mess. For example HLS vs Dash or Fair Play vs Widevine and the refusal of Apple to adopt AES-128 CTR to alleviate the problem with interoperability between devices. All of this because they want to extract the maximum profit from their users and lock their users.
The lightning cable was a prime example, where Apple put a small DRM chip that needs to authorize that the cable is authentic otherwise your phone won't charge. And all of this so that they can charge third party vendors royalty fees on their cables and their long standing refusal to adopt USB-C on the iPhone.
You can set the camera to store the pictures as JPEG.
I am happy with JPEG for my holiday photos.
Just check that you have the best quality setting since JPEG uses lossy compression.
While HEIF is not the doomsday thing some describes it as, it currently is somewhat problematic.
There are for example problems, originating in differences in implementation between different hardware vendors, with 10-bit and HDR.