der Bolzen
bolt
A short, thick metal pin that is often used to connect machine parts. As a rule, it does not have a thread like a screw.
Der Mechaniker sicherte das Rad mit einem stabilen Bolzen.
The mechanic secured the wheel with a sturdy bolt.

bolt
Loading your saved state.
bolt
A short, thick metal pin that is often used to connect machine parts. As a rule, it does not have a thread like a screw.
Der Mechaniker sicherte das Rad mit einem stabilen Bolzen.
The mechanic secured the wheel with a sturdy bolt.

To distinguish the meanings, pay attention to the context. If it is about technology, machines, or construction, the metal pin is meant. In a historical context or with weapons such as the crossbow, the projectile is meant.
Für die Reparatur der Maschine fehlt uns noch ein passender Bolzen.
We still need a suitable bolt to repair the machine.
The expression 'einen Bolzen schießen' (to make a blunder) means to make a big mistake or say something foolish. The meaning is purely figurative and has nothing to do with a weapon.
Mit seiner unbedachten Bemerkung hat der Politiker einen echten Bolzen geschossen.
With his careless remark, the politician made a real blunder.
The expression 'einen Bolzen schießen' (to make a blunder) belongs to colloquial language. It is used in informal conversations to comment on a mistake or a clumsy action.
Ich habe den Termin vergessen – da habe ich wohl einen Bolzen geschossen.
I forgot the appointment — I guess I really made a blunder there.
In the technical sense, 'Bolzen' (bolt) is often used with verbs such as 'einsetzen' (to insert), 'befestigen' (to fasten), 'sichern' (to secure), or 'lösen' (to loosen/remove).
Der Monteur musste erst den alten Bolzen lösen, um das Teil auszutauschen.
The technician first had to loosen the old bolt in order to replace the part.
desire / buck
'einen Bock schießen' and 'einen Bolzen schießen' can both mean that someone makes a serious mistake. That is why they are easy to confuse. 'einen Bock schießen' is the much more common idiom. 'einen Bolzen schießen' also exists colloquially, but it sounds less general and is not used equally naturally everywhere. The important point is: in this meaning, it is not about the animal 'Bock' (buck), nor about a metal pin or projectile, 'Bolzen', but about a mistake.

Heute hat ihr Chef einen Bolzen geschossen und die Rechnung an den falschen Kunden geschickt.
Today her boss made a blunder and sent the invoice to the wrong customer.
Lea hat im Gespräch mit der Kollegin einen Bock geschossen und den falschen Namen genannt.
Lea made a blunder while talking with her colleague and used the wrong name.