Major uses of the comma 2
Example:

“I don’t expect snow tonight,” the meteorologist said “but you should prepare for a steady snowfall all day tomorrow.”

“I don’t expect snow tonight,” the meteorologist said, “but you should prepare for a steady snowfall all day tomorrow.”

Commas are used correctly in the second sentence to set off the speaker from the quoted words.