People sometimes are vehement about the “right” way to punctuate a given situation, but punctuation sometimes allows flexibility.
We have six commonly used punctuation marks (the comma, colon, semicolon, period, dash, parentheses), and after several centuries of writing and reading, we expect to see those marks in certain places. But there is variation in how people punctuate some situations, and the language allows us that discretion, as long as we don’t cloud the meaning of the sentence. Clarity is always the priority.
Punctuation marks are conventions, which is to say they are human created; they are not biological. Most linguists agree that we are born wired for grammar, but not for punctuation. We invented punctuation marks around 1100 as a way to ensure that readers grasp our intended meaning. And we changed the marks and the way use them over the centuries to accommodate changes in syntax (the arrangement of words). The subject, verb, and other elements did not always appear in the order they do today.
Most people agree that a sentence with too many commas, or none, is difficult to read; a sentence with too many hyphens is boring; and a sentence with too many dashes can be confusing. But beyond that, punctuation use is variable. If you always want to use a comma before “and,” you can do that. Or if you only want to use a comma before “and” when necessary, you can do that too.
Some people will use a semicolon in a place where someone else would prefer to use a comma and a connecting word (and, but, or). Some people would prefer to use a dash to emphasize certain information, but someone else who feels no need to stress the information will be comfortable with a comma or a semicolon.
That’s certainly not to say that it’s “anything goes” when it comes to punctuation. Carefully use marks to improve the flow of your sentence and to help clarify your meaning. Think of punctuation is a navigational guide for the reader.