Help understand comma

Goodnight, I’m having trouble understanding why a comma is place in the following sentences

I am Sally Lims, a senior at LM high.

I am Sally Lims, the class President.

I am Sally, a fourth year student, vying to your class President.

Would it be incorrect if a comma isn’t place between student and vying.


Hi Neisha, welcome to our forum. I’m afraid your sentence doesn’t make much sense. Where did you find it? Who wrote it and why?