"Needed" isn't the right word to use here, because you don't really
need very much in software development.
Use a non-visual text editor without highlighting, like ed. Compile your React by hand. Skip TypeScript, you don't need the computer to check your work. /s
Programmers use tools and automation because it makes them more efficient, not because they're needed, and I believe that having multiple monitors (and larger ones? I'm reading [1] right now and it suggests that, which makes sense - if a larger fraction of your field of view is consumed by the same monitor, that's less effort for your brain to parse stuff you see, and fewer distractions; also see [2]) does that. I hypothesize, although I haven't been able to find empirical evidence, that having multiple windows spread across multiple monitors is cognitively superior to alt-tabbing between them.
Additionally, laptop are really bad for you ergonomically. Use a small screen if you must, but your back is not going to be happy after 5 years of programming on a laptop - I know mine isn't.
[1] https://apps.dtic.mil/sti/pdfs/ADA461180.pdf
[2] https://www.microsoft.com/en-us/research/wp-content/uploads/...