Two axes that look similar but feel different
Width (more hidden units per layer) increases the number of features the network can compute in parallel at each level of abstraction. Depth (more layers) increases the number of compositional steps the network can take to build complex features from simple ones.
The universal approximation theorem says a single hidden layer with enough width can approximate any continuous function. In practice, depth is exponentially more parameter-efficient than width for problems with hierarchical structure (vision, text, code). One deep net often beats a wide-and-shallow net of the same parameter count.
The gotcha: deep nets do not train themselves
Naively stacking 50 layers makes a network worse, not better, before the modern toolbox arrived. Vanishing gradients, dead neurons, and unstable activations all kill training. The whole reason we have ResNets, batch normalization, careful initialization, and skip connections is to make depth pay off.
Width has its own gotcha — VRAM grows with the square of the hidden dimension in attention and the linear of the hidden dimension in MLP layers. A 4096-wide layer is feasible; a 16384-wide layer often is not, even on a single H100.
Where this matters in practice
For research and serious production, scaling laws (more parameters trained on more tokens) reliably reduce loss along well-known curves. For a learner, the right move is: pick a published architecture and parameter count, train it on a tractable problem, then experiment with width and depth one knob at a time.