Allan have already mentioned the details on the fact that the only true optical option is 1x and 2x, everything else is done digitally, however there is a difference between how that digital zoom is done, and what you need it for.
For comparison I will include both the iPhone XS (which has two cameras, both 12MP in resolution), and the iPhone 14 Max (which has multiple cameras with different resolutions, although I will not use the Ultra-Wide "0.5x" camera in the discussion below)
I will do a couple of simplification, including referring to the cameras as 1x and 2x camera (other posts already show what this mean).
Let's see various options:
- Taking photographs
- Recording videos in FullHD
- Recording videos in 4K
Taking photographs
The iPhone XS does record photographs in 12MP - 4032x3024 in both 1x and 2x mode. When doing these you will get the best quality picture as the phone will use the full sensor of the appropriate camera. If you do anything else, what will happen is that the phone will crop out the middle of the picture, then resize the cropped picture back to 12MP.
For example let's say you do a 1.5x zoom. The phone will take a shot, then remove the top, bottom, left and right ~17% of the picture, and only use the remaining bits. From the original 4032x3024 picture you will then only use 2688x2016 pixels. This is around 5.5MP, so you effectively thrown out 6.5MP of details from the orignal picture.
Once the phone has this 5.5MP picture it will then resize it back to 12MP by using some kind of algorithm. These algorithms have become better nowadays, but generally the phone will still compute the missing bits, and this is where you effectively lose details. (Note there are a couple clever optical tricks that can be used, like sensor-shift to improve on this performance, but not sure how well Apple uses these during resizing)
Technically you can also just take the picture at 1x zoom, then when you download the picture crop it out to the same 1.5x crop, and resize it by hand for example by using tools like Resize AI potentially getting a better quality image, although this only works well if you take your original pictures RAW.
For iPhone 14 Pro note that the main 1x camera is doing a 48MP picture, while the 2x zoom one does only a 12MP picture. Technically when you take a 48MP image and crop it down to half the size you would get a 12MP picture, which is the same resolution as what the 2x camera would take, so you get a somewhat seamless switchover between 1x and 2x - at least resolution wise
Recording in FullHD
FullHD is 1920x1080, around 2MP. This means that when you take a FullHD video recording you only need 2MP of resolution - a width of 1920. So if you have the 1x lens, which takes 4032 pixel width 12MP pictures you can crop it down to 2.1x zoom and still have enough resolution in the cropped image to get a nice image quality that has not been touched by digital means (apart from cropping).
So even if you only have a phone that only has a single 12MP camera you can technically zoom between 1x-2.1x without losing any optical resolution - all of the pixels in the resulting movie will be actual pixels from the sensor, and not something added digitally. It would still be preferred though to use the 2x lens for the 2x zoom, because features like pixel binning would still likely get a better quality image in the end.
This is even more shown when using a phone like the iPhone 14 Max, where the main camera takes 48MP (8064x6048) images. Technically here you can go all the way up to 4.2x zoom with the main 1x lens, and all the pixels in your FullHD movie would still be from your original 48MP camera's optical sensor without the need to digitally calculate pixels.
Recording videos in 4K
This is similar to FullHD recording, but 4K actually has a resolution of around 8MP - 3840x2160, so there is less leeway. For example your 1x lens can only zoom up until around 1.05x zoom to still get the full 4K resolution, afterwards - between zooms of 1.05x and 2x it would need digital resize algorithms to calculate the missing bits. Then once again when reaching 2x zoom it would switch to the other camera, and have the full resolution once again, up until around 2.1x zoom. So if shooting 4K videos I would only do zooms between 1x-1.05x and 2x-2.1x to get the best image quality, anything outside of this range will need to use digital means to fill-in missing optical data. These values are low enough that I would not zoom at all, just use the two fixed points when shooting 4K videos.
Obivously this is better with an iPhone 14 Pro - the 48MP 1x lens has enough resolution to go down to 2.1x zoom and still have enough optical resolution to take 4K videos. Switching to the 2x and 3x cameras on this model will be more seamless therefore and you would be able to do zoom in the 1x-2.2x and 3-3.3x range without needing for digital resize algorithms to fill in missing optical pixel information. It would still be interpolating between the 2.2-3x ranges though
TL;DR
So in short there are diferences between what people call digital zoom. When taking full-resolution photos this usually means that you can only have true optical zoom at the 1x and 2x options. However when moving over to video, due to how cropping works you would still get good quality image when using some zoom options.
That's because cropping still preserves the original optical details from the sensor and doesn't "add" details that are not present in the original optical source. Most people would still call this digital zoom, as the zoom is done using digital means and not via true optical tools, but because the pixel information is not interpolated you might be able to consider this as some kind of optical zoom.
(Note: Apple's website do consider everything from 0.5x-3x zoom as optical, at least on the iPhone 14 Pro's website, even though this is only true when doing videos, as photos will be done using cropping + resizing between the zoom values)