There are several techniques for generating gears in STL, each with its advantages and disadvantages:
The generator will tell you the Pitch Diameter. gear+generator+stl
While primarily a 2D tool that exports SVG and DXF files, it is widely used by makers who import those shapes into Tinkercad or Inkscape to create 3D models. There are several techniques for generating gears in
You can, but it rarely works well for functional prints. Here is why a gear generator is superior: gear+generator+stl