The first person to describe the spiral was the Greek scientist Archimedes (circa 287 BC - 212 BC). The Archimedes spiral is a huge spiral mounted in a wooden cylinder that lifts water from one level to another and irrigates the field. The true inventor may not be Archimedes himself. Maybe he just described something that already exists. It may have been designed by the craftsmen of ancient Egypt to use the irrigation on both sides of the Nile.
In the Middle Ages, carpenters used wooden nails or metal nails to connect furniture to wooden structures. In the 16th century, nailers began to produce nails with spirals that could connect things more securely. That is a small step from this kind of nail to the screw.
Around 1550 AD, the first metal nuts and bolts that appeared as fasteners in Europe were hand-made on a simple wooden lathe.