It is important to know that there is no one to one correspondence of letters and sounds in English. The letters are 26 while the sounds are 44. A vowel letter may generate a consonant sound as in the case of vowel letter u which is generating consonant sound /j/(pronounced as y) as in union. Also, a consonant letter can generate a vowel sound as in the s in ss2.
It is important to know that article a comes before consonant sounds and not necessarily consonant letters, which is why we say a union and a university and not *an union or *an university. The article an also comes before vowel sounds and not necessarily vowel letters. This is why we say an SS2 student and not a SS2 student because the first sound in letter s is /e/ which is a vowel sound. However, we say a snake and not an snake because the first sound letter s gives in the pronunciation of snake is /s/ which is a consonant sound.
Spoken English demands a greater attention on sounds than letters.
Do have a great week!