the problem understanding cpus that way is that, they are micro, actually nano sized stuff.
The processor basically runs on what's called a transistor (which you can learn more about in wikipedia if you want)
The more transistors, the more performance, but also the more heat and power consumption.
You can reduce the heat and power consumption by making them smaller, which is what the NanoMeter or NM for short means in what's called the "node size"
Intel currently produces chips at 14nm, Amd in 7nm, and apple in 5nm, but smaller NM doesn't mean strictly better perfomance, what REALLY matters is the transistor density, but sadly, there isn't a very good way to measure it, or atleast not a way that is advertised.
A smaller node can either increase performance, reduce power consumption and heat, or all of the above.
Sometimes a smaller node is just a modified version of a larger one, like what amd did using TSMC's 14nm, and 12nm. the 12nm that was used for ryzen 2000 and the rx 590 is the same as 14nm, just with better stability on higher clocks, and overall slightly better results, but nothing above 5%.
another example is samsung's 8nm, that Nvidia uses, which is actually TSMC's 10nm, adapted to be smaller, and a little faster, but it's power consumption is not great, yields aren't great either.
Yields is actually something important too
The yield of a node is how many defects there are in a wafer. Cpus, or any processor/silicon chip is produced on what's called wafers, which are basically a circle, that is then cut up into cpus. The reason cpus are not larger than a a fingernail at best, is because the bigger you go, the less cpu's you have on a wafer, making yields lower.
Cpus are made of silicone btw.
pretty sure this explanation isn't really what you asked for, but if you really want to learn about it more, read wikipedia pages about cpus, and transisors, manufacturing nodes and silicone.