Memory size isn't the only thing.
There is also whether it is ECC or not,
whether Registered or unbuffered. (don't think this applies to DDR4)
My trash can had come with unbuffered and I couldn't find unbuffered RAM
that fit the rest of specs so I had to ditcth the RAM and populate from
scratch with new registered ones.
Not sure I have the right CPU, biut it matches the generic Specs Apple
gives for 2018 Mini (3.6hgz with 6MB cache).
>
https://www.intel.com/content/www/us/en/products/sku/126688/intel-core-i38100-processor-6m-cache-3-60-ghz/specifications.html
sysctl -n machdep.cpu.brand_string
The above will give you your exact CPU model number, not the "pretty"
thing the Mac GUI tells you. With that you can lookup the exact specs on
the Intel site. (man sysctl to get list of variables you can list).
Example for my trash can:
To get memory specs:
system_profiler SPMemoryDataType
Memory:
Memory Slots:
ECC: Enabled
Upgradeable Memory: Yes
DIMM1:
Size: 16 GB
Type: DDR3 ECC
Speed: 1866 MHz
Status: OK
Manufacturer: 0x0000
Part Number: -
Serial Number: 0x00004B43
The information for each DIMM is the same as shown by System
Profiler/System Report app. But the top ones (ECC enable, and upgradable
yes/no) are not shows in the GUI.
(Note, in my case, the software doesn't show if registered or
unbuffered, it's on the label or look up model number on Internet)
But as I said before, appears to not be an issue with DDR4.
Assuming I got the right CPU for your 2018 Mini, you need DDR4-2400 with
or without ECC .
Since Apple states memory is not upgradable, they won't give you the
specs, so you have to find out what you hyave and what the Intel specs
are for that CPU.