If you are interested in programming and coding, then you can buy a windows laptop with decent specifications. It doesn’t have to be high-end. You can make it dual boot to get Linux as well. For development, Linux is widely used and compilers are available too. Some software work well in windows and Linux will be great for development.
Congrats on your selection. Now, instead of asking whether you should buy a windows laptop or an Apple Macbook, you should ask which operating system you should use, Windows or Mac OS.
If you want to be a serious programmer, none of the two operating systems, i.e. - Windows, or Mac OS, is considered the best. You should choose Linux as the operating system for this purpose. In Linux, you will be able to learn the most important aspects of software engineering, provided you are interested in software development.
If you are not interested in coding then choosing CSE altogether is not a good decision.