Hopefully it's "just" the RAM...
By @Marc31956282owkl
Unfortunately, it’s the opposite, it’s everything but the RAM.
CPU: The Intel Core i5 of the 2012 iMac is underpowered for today’s higher megapixel images because of three things: It’s 11 years old, built on an older, less efficient Intel architecture, and it has only 4 cores. Compare that to today, where the absolute cheapest M1/M2 Mac has 8 CPU cores, which improves things like building more previews in parallel. (For PCs, the 13th generation Core i5 with 10 cores is 2 to 5 times faster than the 2012 iMac’s 3rd generation Core i5, depending on the test.)
Graphics: The 1GB of graphics memory is only half of the 2GB required today. With the additional memory and a lot better performance overall, today’s graphics hardware can do Lightroom AI masks and AI Denoise in a fraction of the time as graphics from 2012. (If you buy a new Mac, with Apple Silicon graphics memory is dynamically shared with the system, which is why Apple calls it Unified Memory. This is not to be confused with traditional Intel Integrated Graphics which also shares memory with the system, but much less efficiently.)
Memory (RAM): The 16GB memory is actually the most acceptable part. Although it’s better to have 32GB when working with higher megapixel images, partly to allow graphics to have more Unified Memory, a current Apple Silicon Mac will still run Lightroom Classic well enough with 16GB of Unified Memory.
Storage: You didn’t mention this part, but internal storage in a 2012 iMac tops out at around 500MB/sec on SSD, much slower with a Fusion Drive or hard drive. The internal SSD in today’s Macs, such as a Mac Studio, have a peak throughput of around 7000MB/sec. Yes, 14 times faster than the fastest option in 2012.
But storage speed is less critical for photo editing, so the weakest links are both graphics and CPU.