Which Computer is the best for programming?
The one you can afford right now.
Not everyone has a budget for the latest MacBook Pro M20 Ultra Max Super Deluxe maxed out. Even more so, very few of us will ever need that much power for most programming.
However, for a slightly longer answer, it does also depend. If you are going to be doing lots of number crunching, running docker containers, looking at large data sets, then do a little more analysis of the options available to you. There are niche cases where you are going to need to save up and wait. For the 98% of the rest of us, go with what you can afford.
If you are just starting out, see my first sentence. You do not need the expensive flashy computer. Get what you can afford. Even Chromebooks allow you to run linux and program locally these days.
It does not really matter if you have Windows, Linux, ChromeOS, or macOS, just get something to start. You can find your happy place later. All the OS’s are absolutely fine to program in.
Of course, once you’re well on your way and earning a great salary, then splash out on something you want. I will not judge you (yes, I am saving up for that MacBook Pro M3 Max with bells. Maybe it’ll be the M4/M5 by the time I can afford it).
Just get started now, and figure out the rest later.