The assumption implies the person in question here already has a laptop. Well by default a computer system or a laptop comes with a default OS installed on it to enable it run it's functions. However this does not limit you to a particular OS with the aid of a virtual machine you can run other OS and in some cases even without one. Below are some OS i would recommend.
- Linux; This is due to its resources and great use in programming, compiling faster than windows.
- Windows 10: Usually debated to be one the best OS Put out by windows(before 11), I would recommend this due to its distribution and support system.