An easy way to see this would be to work through the “dimensional analysis” in a particular case of forward propagation. Please have a look at this thread and see if that helps.
The point to keep in mind as you follow the dimensional analysis is that the dimensions of the W^{[l]} and b^{[l]} values depend only on the numbers of neurons in the corresponding layers (or input features in the case of the first layer). But the activation values Z^{[l]} and A^{[l]} will have the number of columns equal to m, the number of “samples”.