The first lesson we all learn is that "said" is the attribution verb to use except in special circumstances. Even "ask" is dicey, because it's already implicit in the speech itself. I've been thinking about why this is so, and why other verbs jump in my face yelping when I see them used as attribution words. I think the reason is that the "he said/she said" is sinking to the level of convention, to the level of the quotation marks and the comma used to set off the dialog. It's not quite that far, but it's far enough that "said" vanishes in the reader's mind and other verbs don't.
So it's like any other convention of fiction: take advantage of it most of the time to keep the reader moving along smoothly; break it when the attention you get by breaking it is useful.
This is just my taste, but using words that aren't speech-words as dialog attribution gives me hives. "Hello," he smiled. "Smiling" is not a speech-emitting action. Won't go there. "Mutter" and "whisper" and "yell" are speech words. Though even with those words, I'll try to find a way to turn the voice-indicators into action adjacent to the speech.
His voice was slurry when he answered. "Hurts."
That's my current approach, anyway.
"Said" is kinda plain. Sometimes people say things with emotion. This leads to the temptation of adverbs.
There's a line of thinking that says all adverbs are death. Yeah, it's better to take the meaning of the adverb and fold it into the verb somehow: use a stronger, more vivid verb. I haven't yet decided to eliminate them all. (Doubt I will, because extreme positions like that only rarely turn out to be useful.) At the moment, I'm using them cautiously. I'm trying to use them only to describe a manner of speaking, and not to comment on the content of the speech.
The inadvertent Tom Swiftie is a dreadful thing. Even when you're not accidentally punning, the "said joyfully" thing isn't great. The emotion needs to be in the character's words already. Or...
Action cues. Another way to indicate to the reader who said what, with the extra benefit of carrying emotional cues as well. Or moving the story along. This is nothing more than juxtaposing speech with the speaker doing something. (For some reason I prefer the action-then-speech order. Haven't analyzed why. Perhaps it's that people twitch then think?)
Buffy edged for the stairs. "Your socks? Um."
I'm finding using action cues harder when I've got dialog bouncing around among three or more people. Patterns become obvious to the reader when they're repeated too much, and my theory is that's bad. I try to break up patterns unless they're part of some specific thing I'm doing; a repeated action-dialog pattern would be something I'd vary as soon as I realized I was doing it.
Fortunately there are other cues to use.
Character voice cues. Giles' sentences are different from Buffy's. Willow-babble is distinct from Xander-babble. Not every bit of dialog is long enough or important enough to justify being decorated with strong voice cues, though.
Content cues. If one of the Scoobies says, "The prophecy's in Greek. I translated it last night," you know it's Giles speaking. There are often other story constraints that make it so only one person could be saying something. I'd worry about making the reader work too hard to decode this, though. I'd probably stick with well-established character stuff as putting less cognitive load on the reader. (Giles translates, Willow hacks, Buffy slays, and so on.)
Then sometimes I'll use a "he said" in the middle of a chunk of speech just to break up the dialog and make the reader experience a pause that was there in the spoken words. For a while I was going through a phase of doing this too much; I made myself remove all instances of it from a story once.
Getting this stuff right is one of those later-draft tasks for me. First drafts are about getting the story down in some form, however rough. The second draft smoothes out the story. Third drafts are about the fiddly stuff, about making sure everything reads smoothly and flows. I sometimes change things like dialog attributions in the last seconds before I post, during that last panicky read-through.
As with everything, I go through a phase of rigidity when I figure out some new effect, then I relax a bit later when I'm comfortable using it.