Flare is devastating in an optical system. It is mostly caused by stray light rays that enter the camera during exposure. These non-imaging forming rays reverberate about. They are rays that are reflected from the polished surfaces of the individual lenses in the barrel. They are rays that hit objects inside the camera body and reflect off of parts that have a luster. These stray rays eventually bath the image sensor or film during the exposure. This stray exposing light induces flare which robs the image of some of its contrast. Additionally, this is the stuff of ghost images that deface our fine work.
We cannot eliminate these stray rays. The interior of the camera is made flat-black. The lenses are coated, each on both sides to abate as much reflections as possible. Your task is to be aware of lamps and bright sources outside the limits of the field of view and try and stay away from them. The lens hood is a good defense. It blocks peripheral rays that are not part of the principle image that might otherwise enter the optical system. There are few downsides to mounting a lens hood. They add bulkiness to our streamlined cameras. If their diameter is too small they vignette the image (cutting off the corners). You can mount and regularly use lens hoods specifically tailored for an individual lens. You can mount a lens hood that is too big for most lenses, however it does a good job on one or two. The choice is yours; you can even disregard the use of a lens hood. Any lens hood that does not vignette is better than no lens hood