I was recently quite surprised to find out that modern CPUs only have around 2 billion transistors and even GPUs like the GTX 1080 Ti have only 12 billion. A quick calculation on the other hand shows that a 256 GB micro SD card has roughly 1 trillion transistors (assuming 2 bits per transistor with MLC NAND) occupying the same area as a multi core CPU (the i7-8700K has a die area of 149mm^2, an SD card is roughly 165mm^2).
This seems very off to me but I can't see what I am missing, I know there is probably an error with my calculations as even the 11GB of VRAM of the GTX 1080 Ti should have more than 12 billion transistors but like I said I don't see where I am going wrong.
I can't understand how we can put orders of magnitude more transistors on the same space in relatively cheap electronic parts but have a far greater difficulty doing this with high end CPUs etc which cost much more too. Also given that both processors and flash memory are built on a similar process size surely the transistor density should be roughly the same for both of them. Can anyone clear up this confusion for me?
EDIT: I have made the question more specific as requested.