This activity gives pupils the opportunity to explore some simple number relationships, from which they can be encouraged to make some generalisations. It may also be a good context in which to help pupils ask their own questions - "I wonder what would happen if we ...?" pursuing their curiosity. You will be aware that a lot of perseverance is helpful in solving this challenge. Further support regarding nurturing curiosity can be found at the foot of this page.
With younger pupils or those with little experience of exploration in mathematics and talking about their mathematical thoughts, it would be good to certainly start with cubes that they can handle.
It might also be appropriate for you to bring everyone together after some time to discuss how they are going about their exploration and how they are recording their work.
Invite pupils to ask and begin to answer their own questions: "I wonder what would happen if I ...?". You could use some of the suggestions in the problem itself to prompt those who may not be used to doing this.
Tell me what you have noticed about the numbers of cubes.
What else are you going to explore?
Tell me about what's going on with other shapes of collections of cubes.
Some pupils might look at generalisations that they can say about different layout at the start of any sequence of cubes.
Some pupils may find it helpful to approach the problem using practical equipment, and having help in arranging them.