the lesser of 4 sockets or 24 cores, yes. So realistically the limit on modern kit is 24 with the number of cores on chips these days.
That said, while I've seen some abysmally written crud in my time, I can never recall seeing a SQL Server dedicated VM/Box CPU rather than memory bound. With VMs, certainly, even on multi system consolidated boxes with, <cough> maybe not the best coding practice in place I rarely see over 4 cores necessary even on large-ish systems (as in multiple tens Tb thousands of users).
Of course if you mix apps and SQL Server on the same box, different thing entirely, but if you're doing that ...
I'm a DBA.
I'm not paid to solve problems. I'm paid to prevent them.