Those metal “bars” on a guitar are usually called frets.

On most acoustic, electric, and classical guitars, frets are the thin metal strips set across the fingerboard that divide the neck into fixed semitone steps.