Dialogue tags are confusing in the beginning. The punctuation, the descriptions, and let’s not forget according to some schools of thought, ALWAYS USE SAID. Well, now. Maybe, maybe not. I don’t.
But the trick to dialogues is like this.
“Suzie told me to go to the store,” Diane said. (comma before the end quote and capitalize the D in Diane because it’s a proper noun.)
“Suzie told me to go to the store,” she said. (Again with the comma, but she is lowercase.)
Diane clutched the bag and backed up a step. “Suzie told me to go to the store.” (No tag, but Diane is still speaking, as described by the sentence before the dialogue.)
“Why did you go to that store,” her mother asked. (Comma, lowercase h.)
“Why did you go to that store?” her mother asked. (still lowercase, even though we’ve added a ?)
“Why did you go to that store?” Her mother’s tone suggested Diane had committed a great sin. (Here, we know Diane’s mother is speaking, but we have a description of actions, making it the beginning of a sentence and not a continuation of the dialogue.
Periods are read as stop signs. You don’t want the dialogue tag hanging off the cliff there during the conversation. Commas are read as pauses, but the reader knows to keep going.