This is largely dependent on workload. Some workloads benefit from having more memory, others more cores, or higher frequency. Another consideration is how licensing works for your intended workload as some software companies license on a per CPU or per core count.
The choice depends upon your application and workload, which requires different CPU performance and characteristics. For example, in public cloud application, we may interest more on how many VMs per socket can host, since it directly tight to how much revenue per socket, per machine can generate. Therefore, core count other than frequency becomes more important factor on CPU selection. Of course, higher frequency becomes more important in some calculation intense applications.