The answer can't really be reduced to a single number. At this scale, products might released to manufacturing somewhere around 3 months prior to the launch date to allow time for ramp-up. This means the design must be finalized and tested several months before release to manufacturing.
The majority of hardware and software development doesn't require a complete prototype that matches that final iPhone form factor. Early internal development would be performed on large development boards. The original iPhone prototype board was easily 10x the size of the final iPhone. Photos available here: https://www.theverge.com/2019/3/19/18263844/apple-iphone-pro...
Apple quotes the original iPhone development time as 2.5 years. Later models are built as an evolution of previous models, so start to finish development times are likely shorter for newer models. Development likely operates on a rolling schedule, where each team moves on to their next generation iPhone work as soon as they finish up most of their work on the upcoming model.
New features like face unlock or thumbprint fingerprint readers are likely prototyped separately and will only be included in the upcoming iPhone model if they're sufficiently far along when the design is locked down. If a new feature is too risky or isn't mature enough, it can be pushed to a future model, at least until the design is locked. This means that some features could be in development for many years, across several iPhone generations.
https://www.cnet.com/news/steve-jobs-last-big-project-the-ne...
Some companies work on much more aggressive schedules though. Samsung for example often has a bunch of paths running in parallel that they downselect late on, and Xiaomi will compress a full development cycle into a year for some products.
The design is mostly done if not finish. The only wiggle room are spec and components. Which can change depending on whether it is single sourced and market demands. For example as per court Document during Apple Vs Qualcomm Case, Apple state they required Modem Supply Agreement to be signed and samples to be ready by no later than July for their next year's iPhone. ( That of course only applies to new Modem )
Even the Apple Silicon for next year's iPhone are already finished.
Yes, that means they are already working on iPhone 14.
And that is why the widely reported Rumours of Apple deciding not to ship the iPhone SE Plus in the last minute by certain famous twitter user or so called leaker are complete horse shit.
Everything thing that Apple outsources has also likely already been finalized for the next model at the least especially the screen.
Other components that are closely tied to the SoC like the memory have been selected and contractually procured.
One year before launch PCBs are should already being finalized, fully assembled phones with some features missing like maybe the next years cameras also probably exist in labs.
Apple launches phones relatively very shortly after their announcement and these phones need to be certified around the globe by various agencies a process that can take months and probably around half a year if not longer, other certifications like their IP rating also need to be completed well in advance.
So overall on a yearly cycle the next model is pretty much already ready to go, and the one after that is quite close to being finalized too.
They will do prototypes that are as good quality with final fit and finish, and build maybe a few hundred of them for testing before they give final sign off to their partners overseas.
And they will do internal prototyping of dozens or hundreds of concepts before they ever get to that final pre-production run.
Meanwhile, companies like Samsung squirt out 50+ models per year, at a rate of about one per week, just to see what will stick. And then they test them on the public, gather the information they need, and then effectively abandon almost all of those units in place because they have to be ready for the next model to come out next week.
I suspect maybe new chip versions are in progress and maybe have engineering samples of said chips, and probably a rough idea of the new design. I think the software probably isn't more than a few months ahead of what will be released.
as you get closer ~ 180 days from release you probably start seeing a more complete device ready.
Totally a random guess though. I know movies hint that there are devices 2 and 3 generations ahead floating around in companies...