Just to compare, this is what Apple Tech Specs says for this model, and it depends on what CPU it is configured with:
- 3.0GHz
- 8GB (two 4GB) of 2666MHz DDR4 memory; four SO-DIMM slots, user accessible
- Configurable to 16GB or 32GB
- 3.1GHz
- 8GB (two 4GB) of 2666MHz DDR4 memory; four SO-DIMM slots, user accessible
- Configurable to 16GB, 32GB, or 64GB
- 3.7GHz
- 8GB (two 4GB) of 2666MHz DDR4 memory; four SO-DIMM slots, user accessible
- Configurable to 16GB, 32GB, or 64GB
Ref: iMac (Retina 5K, 27-inch, 2019) - Technical Specifications - Apple Support
However, the unofficial max RAM capacity is 128 GB, using 4 x 32 GB DDR4 2400 MHz SO-DIMMs. This configuration has been tested and confirmed to work by multiple third-party memory vendors like OWC (Other World Computing) and Crucial.
Regardless, the other thing to take into consideration is that Macs are very fussy about the RAM you use. Don't let price be your determining factor as, in a number of cases, these "cheap" modules turn out to be non-useable in your Mac.