The most important rule to remember about dialogue tags is to make your dialogue easy for your readers to read and to understand.
If your dialogue is short, the lines each character is speaking has few words, and there are two people speaking, then you can use fewer dialogue tags. For example:
“I’m looking for my book,” Lisa said.
“Which book?” Peter asked.
“My math book. Can you help me look for it?”
“Sure, I’ll look in the den.”
If you are writing dialogue where there are three or more characters then use enough dialogue tags to clearly indicate who is speaking. For example:
“You are not funny,” Lisa said.
“I wasn’t trying to be funny,” Peter said, “I was being serious.”
“It was rather hurtful if I may add.”
“I have to agree with Lisa, Peter, I think you were being sarcastic,” Jody added.
If you are trying to insert action or description, you can use it as a dialogue tag. For example.
Lisa dragged herself across the room. “I’m so tired.”
“I know,” Peter said, drying sweat from his forehead.
If I missed any other rule let me know by commenting below. As always happy writing.