One of the tenets of phonetics is that sounds don't happen in a vacuum - the sounds that come before them and after them influence them. We can see a clear example of this in English with velars.
First off, velars are sounds made with the back of the tongue making contact with the soft palate (back part of the roof of your mouth). In English these sounds are 'k', 'g', and 'ng.' When you make these sounds, the back of your tongue moves up. There is a phenomenon called "velar pinch" which means that as your tongue approaches the back of the mouth, the formants (resonances in your voice) change. Formants are basically the identity of a vowel - you can tell vowels apart by looking at the formants. The process of moving the tongue up and back changes the formant to something like 'i'.
Making the 'ng' sound.
This has an effect on some English dialects. For example, let's look at the word 'rang.' In many dialects of english, this is [ræng]. But in some dialects it's [ræɪng] or even [reɪng], so that it almost sounds like 'rain.' It seems these dialects have been affected by the velar pinch. Some examples of this can be seen in rhymes:
And like a stallion racing the rain
You rode on the back of my bike
I knew from the song that you sang
- American Money, - Børns
In dialects where this velar pinching doesn't happen, this half-rhyme doesn't work. They do, however, have other rhymes available to them. In the below meme, you'll see a pun is made based on 'mango' and 'man go.' In Indian English, they are both [maŋgo]. In my dialect, 'mango' is [meɪŋgoʊ] (may-n-go) and 'man go' is [meəŋgoʊ] (meh-an-go), so this pun doesn't work.
Another example is words ending in 'ing', such as 'king.' Traditionally these words use a short 'i' like in 'kin' [kɪn], but a large amount of American English speakers diphthongize it to [ɪi], and Western American English speakers may even turn it to [i] entirely, so that 'king' sounds like 'keen' as opposed to 'kin.' The difference is subtle, so I recommend saying 'kin' + ng and 'keen' + ng to notice the difference between your tongue and how they sound.
Now these two prior examples are before nasals. Nasals complicate things and tend to change vowels as well. How do we know it's not the nasal that's causing it? Partly because you don't see this before other nasals. Americans can say [ræn] for 'ran', or they may 'break' the vowel into [rɛən], but they won't say 'rein' for 'ran.'
More proof that the velar element is to blame can be found in looking at velar consonants... specifically our friend, 'g'. Now 'g' is actually a bit of a difficult consonant to pronounce because it requires a pretty precise coordination of the vocal cords, tongue, and soft palate to be executed well. Many languages do not even have a 'g' and just have 'k', which is easier to say. We can see similar shenanigans happening before 'g' in Western American dialects, which may pronounce 'rag' /ræg/ as [ræɪg] or even [reɪg], famously rhyming it with 'vague' [veɪg]. This also happens with words with an E sound, like egg [ɛɪg] and leg [lɛɪg].
An astute reader may notice that not all vowels seem susceptible to the velar pinch. All the vowels we've looked at: /æ/, /ɪ/, /ɛ/, are front vowels. /æ/ and /ɛ/ are specifically low front vowels. They are made with the tongue pushed to the front of the mouth. This means when you go to make that 'g' or 'ng' sound, the sound has to travel a greater distance to reach the soft palate. This means there's more of an opportunity for shenanigans to happen... like a phantom [ɪ] sneaking into your pronunciations.
Why are only some dialects affected by this velar raising? It probably has to do with microdetails like the exact type of 'g' and 'æ' used by these dialects, as well as their other vowels, vowel length... but we could not have predicted that this would have started happening. Indeed, most dialects of English do not have this raising. Trying to figure out which change is going to happen, stick, and spread is, in the words of John McWhorter, like trying to predict where bubbles are going to appear in your soup. If we could do it well, we could chart out the course of the future English language! But we don't quite have that level of understanding. What we do know is there are changes happening now and they're happening in a pattern. It's a great example of how sounds are affected by their neighbors and the time it takes to reach them.