Do I Need A Comma Before A Name?

Often, writers struggle with commas. It begins in elementary school when we are told a “rule of thumb” that seems to become ingrained in our minds: when you read aloud, if you pause, use a comma. However, there are truly hard rules to commas, and what we were initially told is not accurate. One place of note is when dealing with names and nonessential elements.
Whether you use a comma with a name depends on if the name is considered essential or not. Impression Editing does a great Job of explaining this:
If Amanda has only one sister, we would write the sentence like this:
- “Jessica bought the tickets for her sister, Amanda.”
In this sentence, we place a comma between “sister” and “Amanda” to indicate that “Amanda” simply provides more specific information about “sister.” Because Jessica has only one sister, “Amanda” is nonessential information: we could remove “Amanda” from the sentence and still narrow down the recipient of the tickets to one specific person. We wouldn’t necessarily know the name of the person who received the tickets, but we would know that they were for Jessica’s sister. If the reader doesn’t know how many sisters Jessica has, the comma signals to the reader that Jessica has only one sister.
Note that we treat essential and nonessential information in a similar way when it falls in the middle of a sentence instead of at the end. In this case, however, we place commas on both sides of the nonessential information.
https://www.inpressionedit.com/2016/02/06/how-to-use-commas-separating-nonessential-information-from-the-main-part-of-a-sentence/
- “Jessica called her sister, Amanda, to ask about the concert tickets.” (Jessica has one sister, so “Amanda” is nonessential info.)
- “Jessica called her sister Amanda to ask about the concert tickets.” (Jessica has more than one sister, so “Amanda” is essential info.)