Here's why:
* Alliteration: This is the repetition of the same consonant sound at the beginning of words that are close together. For example, "Peter Piper picked a peck of pickled peppers." There's no repetition of consonant sounds in "The cat said."
* Onomatopoeia: This is the use of words that imitate the sounds they represent. For example, "buzz," "meow," "crash." "The cat said" doesn't use any words that directly imitate a sound.
While the sentence might be part of a larger phrase that includes alliteration or onomatopoeia, on its own, it is neither.