Add a Mate - Flush constraint between appropriate Origin workplanes of the shaft and the gear.
Attach your assembly here if you can't figure it out.
-----------------------------------------------------------------------------------------
Autodesk Inventor 2019 Certified Professional
Autodesk AutoCAD 2013 Certified Professional
Certified SolidWorks Professional