After decades of hiking, backpacking, and X-C skiing, I've standardized my hats. For a pleasant day without too much sun, I wear a standard baseball cap with a PTFE liner. If it gets sunny, then I stick a bandana over my head under the ball cap, so it mostly protects my neck and ears. If it gets cool, I fold up the bandana so that it becomes the insulated liner inside the ball cap.
If it gets cold, then I pull on a down beanie over the ball cap. If it gets cold and sunny, I use the bandana along with a second bandana. I tie or pin two corners together to make a long rectangular bandana. That goes over my head, under the ball cap. It is long enough that the sides hang down to my neck, and the bandanas open in the center for me to see through, so my face is about 90% covered. One drop of sunscreen on the nose finishes that.