Using automatic weights in Blender is a fast way to rig a character. However, you may come across a problem where the eyes don't follow the head when you move the head bone. This can be fixed by assigning the geometry of the eyes to the head Vertex Group. After this, you should also check that there are no unwanted bones affecting the eyes or the faces around them.
Fixing the Eye Problem in the Rig
The Faces of the Head Vertex Group
When you attach the mesh to the rig, you may run into a problem where parts like eyes or teeth don’t follow the head.
To solve this problem, select the mesh and go to Edit mode. Open the Object Data Properties tab. Make sure you have the head Vertex Group selected and click the Select button to see which faces are applied to that group. As you can see the eyes are not part of the group.
Select them as well as any other faces of the head that are not selected. Now press the Assign button to set the selected faces to the head Vertex Group.
Other Bones Affecting the Head
Now the eyes follow the head but they don’t stay on the surface of it.
This is because the faces around the eyes are affected by multiply bones instead of just the head bone. These bones are most often the bones that are close to the head. In this case, it’s the arms so let’s select one of them from the list and click the Select button. Nearly half of the faces of the head are assigned to this group when only the arm faces should be assigned to it.
To remove the whole head from this group, first, deselect the faces that should be in the group. Press the Remove button to remove the selected faces from this Vertex Group.
Now the arm Vertex Group has only the arm faces assigned to it.
This should be done to the other arm as well. The character’s legs are next to the head so they probably have the same problem too so remove the faces of the head from their Vertex Groups.
Now the rig works as it should.