Just realised, after singing this for over a year that in Śaraṇaṁ Gaṇeśa the ...ṇaṁ changes to ṇan...it just shows paying attention reveals something else each time...that said, beautiful song, every single time
So in Gaṇeśa śaraṇaṁ I sing ong instead of om and gang instead of gam. Why?
When we see Om, it can be helpful to remember that this is not an English word. Oṁ or Oṃ is a transliteration into the Roman alphabet. It is a representation of the sound. The O is not o, it represents the combination of the Sanskṛt vowel sounds that are transliterated 'a' and 'u'. When the Sanskṛt vowels a and u are combined they become the long Sanskṛt vowel sound represented in Roman transliteration as 'o'.
Similarly, the ṃ of Oṃ is not the English m but what is known in Sanskṛt as 'anusvāra'. The way anusvāra is pronounced depends what follows it.
If it is final, ie if nothing follows it, then it is pronounced at the labial 'm' akin to m in English. If another sound follows it, this will determine how the anusvāra is pronounced, which of the five anusvāra possible pronunciations it will be.
Anusvāra can be pronounced to correspond to each of the...
... (continued) five places of articulation: guttural ṅ, like the ng you notice here; palatal ñ, pronounced like ny canyon/ ñ in Spanish cañon in (and like the Italian gn in gnocchi); cerebral ṇ, where the tongue touches the palate, dental n where the tongue comes to the teeth, and labial m on the lips.
So what does this mean?
If I just sound Oṃ, if the ṃ is final, it will end with labial m, like the m in English.
Similarly if it is followed byb another labial sound, it will also be sounded as the labial m, as in, for example, Om Mani padme huṃ
However, if it is not final and it is followed by a non-labial sound, the ṃ of Oṃ will be pronounced to agree with the following sound, hence:
Oṁ gaṁ gaṇapataye namaḥ, is pronounced with guttural anusvāra-s: oṅ gaṅ gaṇapataye namaḥ (ong gang gaṇapataye namaḥ)
Similarly, if I sing Oṃ namaḥ śivāya, or Oṃ namo nārāyaṇāya, the ṃ of the Oṃ will be pronounced as a...
... (continued) dental 'n' so Oṃ namaḥ śivāya will be pronounced on namaḥ śivāya.
Hopefully this makes sense.
I would also recommend this video on the sounds of Sanskrit that we recorded for the Bhagavad Gītā chapter 2 course. This explains all this quite steadily, with the visual aid. It's about 20 minutes. I think this video will answer your question and make what I have written here easier to relate to if you are not so familiar with the Sanskṛt sounds: https://www.yogaanytime.com/class-view/875/video/Yoga-Sanskrit-Alphabet-by-James-Boag