That 21.5" mid-2011 iMac is very old. Even if you upgraded the operating system as far as it can go, to High Sierra, you would not be able to run photography applications like
- Adobe Photoshop, Lightroom, and Lightroom Classic
- Affinity Photo V2
- DXO PhotoLab 7
- darktable
- RawTherapee
Some vendors, like Adobe, support only the three most recent major versions of macOS. Those would currently be Monterey, Ventura, and Sonoma. RawTherapee goes further, requiring Ventura 13.3 or higher. Even Affinity Photo V2 requires Catalina or later. The current versions of GIMP and GraphicConverter might still run on High Sierra, for the time being, but that's about it.
Final Cut Pro X – Apple's professional video editor – requires macOS 13.5 (Ventura) or later.
If you are interested in getting a Mac for photo and video editing, I would strongly recommend that you look at much more recent Macs that have Apple Silicon processors, that have at least 16 GB of RAM (maybe more if you are going to be doing video editing), and that can run Ventura or Sonoma.