The wheel has mass, linear momentum and (significant) angular momentum.

It is the combination of linear and angular momenta that create the gyroscopic force which cuases the resotring correction.

(the initial deviation is caused by unven ground, a stone etc)

Consider a rotating body moving along a line AB with uniform angular velocity omega and unform linear velocity V

This creates a gryroscopic acceleration alpha as shown

\(\displaystyle \alpha = 2V\Omega \)

Full analysis of this is beyond high school mechanics.