Let me start out by saying that Steampunk isn't about being historically accurate, and that everything I'm about to tell you is entirely optional. That said, let's take a look at the history of screws!
What many people don't realize is that before we had metal screws, wooden screws were in wide use for things like wine and oil presses. Generally, the invention of the screw is attributed to Archimedes in the 3rd century BC. That was a long, long time ago. Metal screws and even screwdrivers have been around since at least the 16th century AD, so they were hardly an "invention" of the Victorian era.
That said, screw technology became extremely common during the Victorian era due to advances in machining techniques. Finally, for the first time in history, screws were able to be produced cheaply, and in mass quantities, so they replaced many earlier joining technologies like nailing, riveting, etc.
But of course screws weren't available in quite the variety of styles we have open to us today, so which screws are period-accurate, and which aren't? Let's take a look!
Below is a diagram of the different types of screw drives that you could use on your projects, if you were so inclined. As you can see, there are quite a lot of them!
The first two at the top left, the slot and Phillips drives, are by far the most common. The vast majority of screws at the hardware store feature these two types of drives. The slot type is safe under any circumstances, as they've been around for a very long time. The Phillips drive, on the other hand, was created in the 20th century by Henry Phillips. So if you're interested in historical accuracy, you should avoid using Phillips head screws in your Steampunk gadgets.
Unfortunately, almost all other screws beyond the simple slot type were pioneered in the 20th century, including my personal favorite screw drive type, the Robertson (aka 'square').
When it comes to bolts, the square drive type was most common in the Victorian era, though hexes could also be found more rarely. In fact, hex-type screw drives were likely invented during the Victorian era, but weren't able to be effectively produced until the early 20th century. So if you don't mind stretching history, there is a historical precedent for screws such as the Roberson or the hex socket to exist.
Of course, there's more to a screw than just its drive type. There's also the actual shape of the screw itself. Below is a diagram of the different head shapes.
There's the pan head, dome head (or button head), round head, truss head (or mushroom head), flat head (or countersunk head), and the oval head (or raised head).
The predominant types during the Victorian era were the pan (a) and truss (d) head. Pan head screws are more often known as machine (or metal) screws, and truss head screws are more often known as wood screws.
The other varieties didn't really exist until later, but you can probably get away with most of them, as the designs are pretty subtle. The drive type is far more noticeable to most than the actual shape of the screw, but now you know which ones are historically accurate!
Exciting, isn't it?