Why does blender cover the whole cube and not selected areas with materials?
To add a material to a specifc face (you can only assign and see material colors to faces), you first need to add a base material to your object, next enter Edit mode, select the face and then add a new material slot and create a new material or pick an already created one from the list and press Assign.