A couple of different representations of the Bolt are explained in this video (about 41 min),
along with some techniques to overcome some glitches with FreeCAD.
This model is created using the following dimensions in mm.
Using Part Design Workbench, create a Body and then a Sketch in YZ plane as shown below.
Revolve the sketch about the Horizontal axis (Y).
Create a sketch on the top flat surface of the bolt as selected below.
Create a Hexagon with center as the origin and 2 vertex in Y-axis.
Set the distance between 2 vertical sides to 6 mm.
Create a Pocket with the new sketch selected, and set length = 5 mm
This completes the bolt model with no threads, as shown below
Using Part Workbench, create a Helix from the Parametrized Geometric Primitives
Set the dimensions as per screenshot and set the direction to Y-axis in location
Create a Sketch using Part Design as shown below.
This triangle will be used to cut the threads on the bolt along the Helical path.
Select Sketch002 (Triangle) and click on Sweep a sketch on selected path in Part Design Workbench.
Select the Frenet option for the orientation mode.
Select the Sweep Path by clicking the Object button and then click the helix in the model space.
Click OK to create.
Hide the Helix shape, by clicking on it and press Spacebar
This completes the Socket Head Bolt with threads.
The appearance of the bolt can be set as desired.