What is the best UE4 PC setup? (Mainly CPU) And why?

Well, there’s a couple of very important point to note here:
Intel are more widely used - almost all “recommended specs” and alike are given for Intel because - most people have an Intel.
While there are many reasons for this primarily most off the shelf computers use Intel (contracts, patents, closed door deals, deliberate compiler errors, it’s war - who needs a free market etc.) it’s just how things are.

Secondly Intel processors are, simply put, better for gaming. Most games, including those you make in UE4 don’t use more than 4 cores, thus Intel win because they have better cores - benchmarks reflect that.
But there’s a huge different between playing a UE4 game, and developing a UE4 game - the editor and compiler (especially for shaders) eats up as many cores as you will let it, and the more you have the faster it goes. (though sometimes you have to set this behavior, Visual studio defaults to only using 2).

AMD is almost always a better price-per-flop if you can make use of all of it’s cores (something developers almost always do). Clock speeds are always irrelevant, Server processors are almost always slower than home-PC’s for clock speeds, yet have across the board better data-processing rates. Unfortunately this is something processor marketing people don’t want anyone to know. Flops matter, Cores matter, clock speeds are a misnomer.

As for what compile times - it’s an honest combination, the best processor in the world will do you no good if your hard drive is from 1980, but with a good CPU/SSD/RAM combination it’s normally SSD read/write speeds and processor Flop-counts.

Finally, performance optimizations often come out over time, Intel for example has amazing 8bit optimization for python - but it won’t do you any good if the version of python is from before it was made available.

IE: anything that appears to “suck” on Ryzen may actually improve in a newer version.