A screw is usually installed into a tapped hole, unless it is a self-tapping screw which creates its own thread. Screws don’t need nuts, as they become secure by being tightened into the hole with a screwdriver or driver bit which fits into the drive recess.
Bolts are designed to be installed with a suitable nut. The hole for a bolt is not tapped as the bolt is pushed through and is fixed and tightened using a nut at the back of the material being fastened. So a bolt will be longer than the width of the material it is being used on, as it needs to protrude through to the other side to screw into the nut.