You can do that at creation time and set the number of subdivisions yourself. But once you press enter, you can no longer add subdivisions.
Then as, @hentsteph-1 suggested, you can enter polygon/edge/vertex mode and just press ‘Shift+D’ and choose ‘faceted’ as the mode of subdivision. you may have to repeat it several times depending on the number of subdivisions you are aiming for.
Another option is to use the ‘procedural’ version via the operator stack. That way you can add as many subdivisions as you want even after you have created the cube.
Press ‘N’ to create a new empty mesh and from the ‘add item’ drop down in the scene list view, choose add operator and choose ‘cube’ ( or any other primitive )
The cube will remain editable.