A cube can be considered a block. A block is a solid piece of hard material, typically with flat surfaces on each side. A mental block is an inability to think through or recall something. The word block is being used in different ways here.
When the artist tried to draw a cube he had a mental block .