Knowing all the ways a sound can be spelt, as your dd does, does not tell a child which one is right for a particular word. That comes with lots of practice, as Maizie says, and the 'muscle memory' helps. - Some children are able to imprint the 'right look' of words on their memory from meeting them in reading, but most have to work at it.
But the spellings for some sounds are more stable than others and worth learning to the point of overlearning. This includes most consonants (b, d, h ....).
The consonants that have exceptions, like g, m or r (ghastly, guard, dumb, autumn, wrong, rhubarb) don't have as many of them as vowel spellings.
For the vowels, only the spellings for /a/, /ar/ and /oi/ (fat, cat, spat...far, star, start...boil, oil; boy, toy) have very few exceptions.