You don't need fancy hardware to get started on your coding journey. A low-spec computer will likely be more than you need to ...
Laptops are practical because you can take them with you. However, laptops have a relatively small screen. If you work on a mobile computer, it quickly becomes annoying to constantly switch programs.
After decades of working with computers, I started to develop some wrist and arm pain a few year ago. So I switched from using whatever random mouse I could find for under $20 to using input devices ...