The best computer configuration for programming is one that can meet the minimum requirements for web development. In general, you should be looking for a laptop with the following:
CPU with Intel i3 processor or better up to i9 processor.
Minimum 4GB RAM to Maximum 64GB RAM.
Solid-state drive (SSD) of 500 GB or more.
Architecture Minimum 32 bit to max 64 bit.
Operating system can be Windows, Mac, Linux.
Consider buying a machine that supports virtualization as well.
As for operating systems, many instructors teaching programming classes recommend that students run Windows 10 on their laptops.