There are many types of RAM. "DDR" in and of itself is not a complete description, and does not tell us whether you have RAM that is compatible with that iMac.
Install memory in an iMac - Apple Support says that you can install up to 64GB (4 x 16GB DIMMs).
iMac (Retina 5K, 27-inch, 2019)
Use Small Outline Dual Inline Memory Modules (SO-DIMM) that meet all of these criteria:
- PC4-21333
- Unbuffered
- Nonparity
- 260-pin
- 2666MHz DDR4 SDRAM
According to MacTracker, that Mac has an official RAM limit of 64 GB, and an actual one of 128 GB.
Macs can be picky about RAM – so most people here would recommend purchasing RAM either from Crucial or from Other World Computing (MacSales), and using the tools on those sites to find the RAM that those vendors specifically recommend, and guarantee to work on, your system.