Brian is the more traditional and common spelling, reflecting the original Gaelic pronunciation.
Bryan is a more modern spelling that emerged in the 18th century, likely influenced by the English pronunciation of the name. The "y" spelling was popularized by the Irish writer and politician Bryan Boru.
Essentially, the difference in spelling is mainly due to different pronunciation and spelling conventions over time. While both spellings are considered acceptable, "Brian" is generally seen as the more traditional and accurate spelling, while "Bryan" is considered a more modern variant.