Cuboids can be formed by stacking
Rectangle/Rectangles
Squares
Cuboids can be formed by stacking rectangles as shown in the figure.
Similarly, by stacking squares, a cuboid can be formed if the height of the stack is greater or smaller than edge length of squares. Otherwise, if the height of the stack is equal to the edge length of the square then a cube will be formed.