How to attach an armature to a model?
Are you sure you did With Automatic Weights? It really looks like you parented the armature to the cube, with the cube as the parent. That's wrong. The cube must be the child.
Make sure you select the objects in the correct order. The so-called active object is displayed orange. The so-called selected objects are displayed red.
The cube must be the child (=red), selected first in the viewport. The armature must be the parent (=orange), selected last. After you parented them With Automatic Weights (Ctrl+P in Object mode) you will see the hierarchy in the outliner. The armature is in the collection, and when you expand the node you will see the cube.

In Pose mode you can deform the mesh.