The kilo/mega/giga/etc. prefixes are defined as powers of 1000 in the SI system.
The application of SI prefixes to powers-of-1024 is somewhat of an abuse but is tolerated in most contexts as a close-enough approximation.
However, HDD manufacturers and some other companies have been sued for using the proper metric definition at a time where most people thought the stretched definitions were universal in computer storage. That is when HDD labels started including disclosures such as "1MB = 1 000 000 bytes"
The reason why HDDs use the proper metric definition while most solid-state memory uses the 'stretched' definition is because HDD sizes have incremental capacity measured in sectors of either 512 bytes or 4096 bytes while integrated circuits use binary row/column addresses and each extra address bit doubles addressable capacity so chip capacities practically always increase by doubles since it is the most natural way.
To disambiguate this, the Ki, Mi, Gi, etc. prefixes were introduced several years ago as the proper power-of-1024 prefixes so the proper name for a 4GB DIMM should be a 4GiB DIMM.