Cowboys rarely wore 'cowboy hats'. They wore whatever came to hand - a sea captain's cap or a straw hat, but especially the bowler or 'derby'.
https://d3drajoq5gm85y.cloudfront.net/wp-content/uploads/2020/11/18220253/Butch-Cassidy-1900.jpg