There's more than one way to solve this problem.
To illustrate, I created this very simple cylinder shaped character with two spheres as eyes.
I parented the body to the armature with automatic weights, but the eyes are still separate objects, so they're not parented to anything. So, for now, when I rotate the top bone, the eyes don't follow the "head":
There's at least two ways of solving this.
The first I'll show here is by parenting the eyes directly to the "head" bone. The eyes are still separate objects, and this won't involve any weight assigning or painting. The eyes will just be parented to the bone just like any object can be parented to any other object in Blender.
To do this, first I select the armature and go to either edit mode or pose mode, and select the bone I want the eyes to be parented to:
Then, without de-selcting the bone, I go back to object mode and select both eyes and the armature, making sure the armature is the 'active' selection (this is indicated by a brighter color in the outline):
(notice the armature has a brighter orange outline, indicating it is the active selection).
Then I press "ctrl + p", and select the 'bone' option in the pop-up menu:
And it's done. Now the eyes are parented to the correct bone, you can rotate it in pose mode and the eyes will follow:
The other way you can achieve the same result is with weights.
So let's go back to when the eyes were not parented to anything.
First, I'll join the eyes and the body, making them parts of the same object. I can do that by selecting the eyes and then the body, and hitting "ctrl + j" (making sure the body is the active selection when I do).
[Note: this step is not strictly necessary, as you can parent each eye to the armature with weights even if they are separate from the body, but I think it's less confusing if it's all joined in the same object]
Now the eyes and body are joined. However, even if they are parts of the same object, they still do not move with the bone. This is because the vertices in the eyes are not weighted correctly:
"Weights" are values that determine how much a vertex is affected by a specific bone. A single vertex might be affected by multiple bones, and how much each bone contributes to that is determined by the weight value for each bone.
There are basically two ways of editing weights. One is weight painting, but that's not necessary in this case.
In this case, we can just edit the weights directly in the vertex groups, in the 'Object Data Properties' tab:
To do that, we go into edit mode and select all of the vertices in both eyes (you can easily do that by selecting a single vertex from each eye and then hitting ctrl+L. That will select all vertices that are linked to the ones that are already selected):
Then, in the vertex groups menu, select the vertex group with the name of the bone you wish to assign the vertices to. Make sure the "weight" value is set to "1.0", and that all the vertices of both eyes are still selected in the viewport, then click "Assign":
Now go to object mode, select the armature and go into pose mode. Rotate the bone and you'll see the eyes will follow:
And that's it, done!