I have packed straw hats with big brims 2 different ways. If the hat says it is packable, then I fold it in half like a taco and roll it like an ice cream cone. Be sure not to leave the hat packed like this for more than 24 hours.
If I doubt that the hat is packable/crushable, then I pack it like CookingChick2020 describes above….fill the crown with soft small items and then pack around the hat.
For my upcoming cruise, I am going to get one of the magnetic hat clips that attaches your hat to your purse. Something similar to the picture. On a cruise last year, I asked a woman who was using one how she liked it. She said she loved it.