[deleted]
The stereotypical "pirate accent" heard in many films is actually based on an English west country accent, and it is the product of the popularity of Robert Newton's portrayal of Long John Silver in Treasure Island (1950).
The origins of the trope have been discussed here a couple of times before. Unfortunately, these threads were archived some time ago and the answers are not as detailed as we would require now, so hopefully one of our piracy flairs will stop by and contribute a fuller response. In the meantime, however, you might like to review the answers in
How did Pirates really speak? Did they have the stereotypical accent that so many people use? Or is that a myth?, with u/sestertius
and
Was the stereotypical "pirate speech" actually real, and if so, where and when did it start?, with u/BRIStoneman