I have a choice of two similar laptops. One has a slightly better CPU while the other has a slightly better GPU. I'm wonder which would benefit this game the most?
You mean, you cannot try the game on both and compare the performance? Are you choosing which laptop to buy? Go to the game store page (either on Steam or GOG) and compare the "Recommended Configuration" with the choices you have. Going above it won't hurt, that's for sure. Just remember that exceeding the requirement in, say, GPU won't give you anything if other components are below the line - you won't notice any advantage. Rig should be balanced to make sense.
Broadly speaking, unless the rig is really old (say, 6+ years old) you should have no problems in either department,
provided it has enough memory. 16 GB is a must nowadays, and if you intend to keep using this laptop for some time, I would say aim for 32 GB. Make sure you don't confuse the system RAM with the graphics RAM (the one installed on / allocated for the graphics card). They are different, and the latter is somewhat less important, especially if you are okay with playing on minimal graphic settings.
Good NVMe SSD will also help - make sure it's at least 1TB, or the laptop has additional M.2 slots so you can install additional storage in the future, if need be.
The above also applies to Macs, with the exception that you can't expand the hardware capabilities yourself.