The nm on a processor does it always mean the smaller it is the faster the processor is? Also always uses less electricity then a bigger size? For example a 14nm to a 20nm or 28nm?
Also once processors get to 5nm what would be next?
Now I've read before that ddr4 is more efficient but for a home. It won't notice the energy as it only uses 15watts less. Though does ddr4 improve and become more effort in less nm or what ever technology ram uses.
So the measurement you're referring to is the transistor size. Smaller transistors mean less electricity, and so that's the power saving you see. Speed improvements tend to come from new architectures. The die shrink is the "tick" of intel's "tick-tock" cycle, so one year they shrink the die, the next they rearchitect the chip. What this means is that while performance and power use do both improve year on year, each year you'll see one take precedence over the other. Broadwell was a die shrink (tick) and mostly power savings. Skylake is a new architecture (tock) and so mostly the performance improves.
Once we get to 5nm? Who knows if we'll get there. That size is down to only being a few atoms across. They're trying all sorts of stacking and layering of transistors to try and get around that, but we may simply be reaching the limit of how small you can make transistors, at least out of silicon. You'll have to wait and see, like the rest of us, what comes next (if anything).
No, you probably won't notice any power savings moving to DDR4. It's faster, though. RAM, like CPUs, have a process technology and so the dies you see on each stick of RAM can be made with a different process. DDR4 is the standard the RAM is using, though, and so as process technology shrinks with RAM, they can simply make higher capacity or cheaper sticks (fewer dies on a stick, or higher capacity dies). That doesn't require moving to a new standard.