I’d say monitor position and ergonomics matter way more than screen size.
Navigating a stack of apps with alt+tab, ctrl+tab is extremely efficient. I only miss the extra space when looking at spreadsheets or comparing things in different windows.
Some laptops have a pitiful screen height, avoid those.
Ultrawide is an extra screen size that many web devs forget about. Good design can take advantage of it. But some fluid designs look terrible without constraints.
I ran a vertical setup, with a monitor above my laptop. Not a bad way to go if you want more space for auxiliary apps.
Focus is essential for productivity. Do whatever it takes to get there.