How do I create and set the depth of a cube in blender 2.80?
If you are using the Edit Mode "Add Cube" tool, you should get handles that you can use to modify your cube visually:

After creating the cube (by dragging the left mouse button), orbit around the cube by holding down the MMB middle mouse button, then just grab a face and pull it in the desired direction. I'm not aware of a way to use these handles with exact numbers.





However, if you want to create a new cube and set its dimensions, I suggest adding it in Object Mode with Add > Mesh > Cube. In the "number" panel (N) you will be able to set its dimensions precisely.