I can only speak for the newest iMacs, but the 27" models (regular and retina) have user-upgradeable RAM. The 21.5, however, is sealed and RAM is not user-replaceable. (I asked about this when I was at the Apple store two days ago).


Jon

macOS 11.7.10, iMac Retina 5K 27-inch, late 2014, 3.5 GHz Intel Core i5, 1 TB fusion drive, 16 GB RAM, Epson SureColor P600, Photoshop CC, Lightroom CC, MS Office 365