The systems your software actually runs on will typically either be much more or less powerful. Compare a large data center or embedded audino to system on which you type code.
Therefore my answer is use the Software and OS that you are most productive as a Programmer for your development system, and consider the deployment environment separately.
-- Now my personal answer...
I have used computers since the early 80s, and a professional programmer since the mid-90s. I have used many operation systems over the years: TRS-DOS, MS-DOS, CP/M, OS/2, Solaris, etc. Today, I spend time daily using: Linux, Windows and Mac.
* My primary workstation is KDE Neon on Ubuntu
* macOS for mobile work and my personal life
* Windows mostly for SQL Server and Active Directory
* Multiple Linux Distributions and Windows for Servers
While I like KDE very much and it is what I use for current my job, I am personally MOST productive doing Development work when using macOS as my Desktop Environment and Linux as my servers.
I highly customize my Desktop Environment to fit my way of working. I find that macOS is the most customizable for me, followed by KDE. Windows unfortunately is a distant third. (For some added context, my basic AutoHotKey file for Windows is over 1000 lines long, so I am very familiar with how to customize Windows.)
I like macOS because nearly everything I could want runs on it, my Unix-style tools, highly polished GUI apps, MS Office, Adobe, (or the many better alternatives from small developers).
I also really like Apple hardware, especially MacBooks for notebooks. My high-end Dell Workstations are great, but I vastly prefer MacBooks for on-the-go.
Some people find benefit from running their Workstation on the same OS as their Servers. This can be a big factor for you. For me, I am deploying to Windows, Redhat-style or Debian-style Linux. I find the difference between Redhat and Debian to be about as significant as macOS's BSD. So I don't get an advantage of running one system.
I write a lot of code that never runs on my Developer system, but only on the various deployment environments.
For servers, I highly recommend using the stack recommended by your selected technologies. This tends to mean you will be running multiple server environments.
If you are asking this question, with some thought to limited funds, I would consider what are the advantages to you personally for a Linux Desktop Workstation vs a MacBook.
Hopefully I have given you some useful food for thought. And much success you your endeavors.