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.