An edge or border. In this case, an edge that sticks out: the brim of a hat.

Example sentence:

My mother wears a hat with a large brim to protect her face from the sun.

Photo credit: Darren // DA Creative Photography,

A woman wears a white sun hat with a large brim all the way around that shades her face and hair.
The part of the hat that sticks out and shades this woman's face and hair is called the brim.