Three points to look for in the clip

The timestamps below run from the start of Codex HQ’s clip. The name in the opening shot appears in the creator’s caption.

See the captain’s hat in the original Rusty Anchor clip
0:00.7The Rusty Anchor and Jimmy’s captain hat appear on screen
0:10.4A figure wearing a hat appears on a pier
0:20.3The player character is wearing a white hat

Why the poster calls it Jimmy’s captain hat

Codex HQ identifies Jimmy as a sailor encountered near The Rusty Anchor in Gambit Bay and reports that his captain hat is available at the end of the encounter. That account describes how the event ends. The later shot shows the player already wearing a cap.

Hat Resembling Arthur Morgan’s Reported at a Port Gellhorn Yard Sale in GTA VI