All three – Assonance, Alliteration and Consonance, create sound effects.
Alliteration
The repetition of an initial consonant sound, as in “a peck of pickled peppers.” Although alliteration is often associated with literary language, it also appears in many common idioms and advertising slogans.
Assonance
The repetition of identical or similar vowel sounds in neighbouring words. As in “a heart no bigger than an orange seed has ceased to beat.”
Consonance
Consonance is the repetition of consonant sounds; more specifically, the repetition of the final consonant sounds of accented syllables or important words as in ” ‘word’ and ‘lord,’ or ‘blood,’ ‘food,’ and ‘good'”
The difference between Assonance, Alliteration and Consonance
Alliteration is the repetition of initial consonant sounds in neighbouring words with emphasis on the first letters.
Good men are gruff and grumpy, cranky, crabbed, and cross.
A moist young moon hung above the mist of a neighboring meadow
Assonance is the repetition of similar vowel sounds in neighbouring words.
Try to light the fire
It beats . . . as it sweeps . . . as it cleans
The spider skins lie on their sides
Consonance is also the repetition of consonant sounds but emphasis on the final consonant letters or sound.
First and last, odds and ends, short and sweet and a stroke of luck.