Side note: you’re using Left Click Select (that’s the default now… it’s fine if you want to do that) and when you wanted to Scale the whole Cube in the Z, you accidentally Selected the top Face.
(Also: try and stop using those Active Tools as soon as possible; the Shortcut for Scaling is S. The Active Tools are like those side wheels on bikes; meant for Blender ‘babies’, so they don’t fall over, but actually causing more trouble than being helpful.)