There are many westerns about reluctant sheriffs, including "The Tin Star," but the one I am looking for has a star that children made for the sheriff, misspelled if I recall correctly. Like usual the bad guy is amazed the sheriff does not cut and run saying something like "it is not even a real badge!" Black and white, 50s or 60s?
This sounds like Firecreek. Jimmy Stewart plays a part-time sheriff in a small town:
"He is a peace-loving farmer whose childishly made sheriff's badge is practically an honorary one."
Roger Ebert described the sheriff (and badge): This time, Jimmy is the part-time sheriff of a town populated with broken-down, defeated settlers. He gets two bucks a month and wears a "Sharaf" badge his kids have hammered out of tin. His wife is expecting another baby any minute now, and the last thing he wants is trouble.
When gunmen come into town (led by Henry Fonda) and start causing trouble, none of the townspeople will stand up to them or stand with the sheriff. It was released in 1968, but is in color, not black and white.