Is there a term for the sort of words that sometimes precede dialogue or quotations, like say, ask, write, answer, cry, and reply?
I think they are called "dialogue tags." Have a look here: https://www.visualthesaurus.com/wordlists/9457
I'm having trouble finding any definitive sources that back me up here, and I am aware that Wikipedia is not an academically-acceptable source, but its page on Dialogue in Writing seems to indicate they are called identifiers (because they identify the person who is currently speaking in a dialogue).
TV Tropes identifies the use of words other than 'said' as a 'Said-Bookism', but that's more referring to the concept of using those words than a name for the words themselves. I'm afraid that's all the information I have at present.