I found a project that I designed few years ago, you can use the script to generate Hexagons & Pentagons, the script is a bit old and messy, but you can see how it may help you understand the principles.
You can’t cover a full sphere with just hexagons. You can cover a half sphere, but the hexagons will have to vary a lot in size.
If you include some pentagons or heptagons you can get less variation in size. For general freeform surfaces you can get this sort of pent/hex/hept mesh with TriRemesh. For spheres specifically, you could use a geodesic dome, based on a dodecahedron.