Updating a shiny old 5K Retina mac can be quite of a hassle since deprecation of Big Sur, the last Apple-supported version on this iMac.
I assume the HDD on the inside already has been replaced by an SSD. If not: Less risky but not bootcamp-compatible is using an external SSD on USB3 with MacOS on it. Bootcamp support for supported Windows will end 2025 as Windows 11 is formally not supported and Windows 10 will be EOL. If replacing the internal HDD for an SSD to enable BootCamp consider a specialized service center as the internal screen-connectors are very fragile.
Once there was a 500gb external Thunderbolt 1 SSD that would fit this machine, but performance of USB3 is not much worse and USB3 allows bigger drives.
With OpenCore Legacy Patcher it's possible to upgrade this iMac to Monterey, Ventura or Sonoma. As long as Monterey is still supported it is the recommended OpenCore-upgrade, but not for long as it will EOL end of 2024.
OpenCore requires the OpenCore EFI to boot before the patched OS at every (re)boot. To enable the Apple-boot Picker at startup this command has to be entered in the Terminal:
sudo nvram manufacturing-enter-picker=true
This way the Option or Alt key doesn't have to be pressed each reboot to pick the right EFI. During an OpenCore OsX-install the iMac and OpenCore bootpickers seem to successively always pick the right default image after the OpenCore EFI is involved at the beginning.
The EFI of OpenCore can also be configured for displaying a second bootpicker from within the OpenCore GUI.
Apple has created a new filesystem that has to be used on SSD's: APFS. The old filesystem for HDD's is called HFS+ or Apple Journaling filesystem. APFS enables a container to contain Volumes that share the size of the container, a more flexible setup than partitioning. Multiple MacOs-versions from HighSierra, which was the first to support APFS, can live side by side in one APFS-container.
To install Big Sur (the last supported OS on this Mac) on the internal SSD it suffices to just have an internet connection (with WiFi?) and press (Option/Alt)(Command/Windows)R at boot. Big Sur can recognize a new APFS container if created with Disk Utility.
Every successive OpenCore MacOSX install (Monterey, Ventura, Sonoma) can be added by adding a volume in the APFS container in Disk Utility and installing the OS to such a named Volume.
The latest Big Sur BootCamp is not able to write to an external USB without all kinds of loopholes, probably due to Vault permissions and such and loss of attention for Intel in favor of Apple Silicon.
The quickest way to create such a BootCamp booter USB that I found is also creating a Catalina install (can live on an external SSD, not on a flashdisk). The booter USB can only be fat32 on GPT, the easiest way is by using an USD flashdrive that is smaller than 32GB, but formatters that format larger drives up to 2TB to fat32 exist.
The Catalina install needs to be created on a USB-flashdrive booter as well, that can be done from the Big Sur command line like on
https://support.apple.com/en-us/101578
including --downloadassets
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --downloadassets
This version of Catalina Bootcamp is able to install Windows 10 build 1903 without problems. Big Sur should work with Windows 10 build 1909.
After installing Windows 10 1903 the upgrade to the current Windows 10 went smoothly from within Windows 10 yesterday.
However brigadier.exe is able to download all Bootcamp drivers necessary for such a Windows 10 install, and the iMac15,1 will boot via EFI, so the OpenCore instruction for realizing this should be a path worth investigating further: https://dortania.github.io/OpenCore-Legacy-Patcher/WINDOWS.html#installation-process
I just followed the advice to create an extra 200MB Fat32 OPENCORE-partition and use that as the main OPENCORE partition during the install of patched OS'es. Windows doesn't require OpenCore, but both compete for the EFI, so best not keep them on the same spot.
After the Windows 10 install there is only scaled 4K resolution via the built in R9 M290 ATI card and no control for brightness. If you look in the Devices after the upgrade you'll see the driver of the display didn't start. Bootcamp doesn't download compatible 5K drivers for the iMac15,1. The best driver I found to enable 5K and brightness-control was from bootcampdrivers.com, but Adrenalin drivers from October 2020 also enabled 5K.