Found metal while drilling into a stud
Unless you know exactly what it is, do not drill through metal in the wall.  There are so many bad things it can be.  Ductwork in the wall wouldn't be terrible to drill into, but then trying to use a sheetrock anchor in that hole might not be a great idea.

If you are drilling into a stud, and you find metal, it could be a nail protector designed to cover pipes and wires that are run through studs.



These are easy to identify because they will sit directly behind the drywall.  They are thick enough so you can't puncture them by accident, but if you have a drill and are determined, you can drill through it pretty quickly.

If there is a wire behind the plate, the damage might not be immediate or obvious but the damaged wire could cause issues later.  (Of course you can get lucky and not hit the wire).

Plumbing pipe is another common source of metal, but in new construction that has been largely replaced by plastic pipe.  Either way if a pipe is drilled, you get pretty immediate feedback that you messed up in the form of a big leak.