This is a duplicate of my own answer at Super User.
This is designed to be the beginnings of a canonical answer to a frequently-asked question, designed for non-experts to rapidly find a solution. If you already know how to do this, see the last paragraph ;)
Do you know what Unbuffered non-ECC means, or why you might need ECC instead?
Do you know the difference between PC4-19200 & PC4-21300 or CLS 15 & CLS 19?
Do you know why DDR4-2666 & PC4-21300 seem to be the same thing with different numbers?
If the answer to any of these is a resounding No then let the experts do it for you.
Many of the large online RAM retailers have automatic configurator pages which will correctly identify your computer & list all possible options for memory upgrades.
It's their job. They're good at it.
Of course, you don't need to actually buy from them directly, you could use the information they provide to purchase from elsewhere, but they provide this service in the hope that they will pick up the business from it & invest time & effort into making sure their databases are up to date & accurate.
This is an incomplete list - these are the major market sellers & not a comprehensive list of all available services. They all have country redirects, so if possible let it move over to your own territory. The following start at the UK link, simply because that's where I'm based.
- Kingston [This one is not fully automatic, you need to start with your computer's or motherboard's model number.]
Of course, if none of this is an issue for you & you already know how to look up your own RAM requirements, then just install Speccy, HWInfo or CPU-Z & off you go…
But if you already know… what are you doing reading down as far as this? ;)
No affiliation with any product or service mentioned above.