I learned such rhymes from my mother. My mother would read to me every day when I was a toddler, I had a large illustrated Mother Goose that had been passed down in my family.
Using the term “teach it” is a bit different from the actual process. Most children learn such things through repetition, from having it read to them over and over.
By the time a child is in Kindergarten, if a parent has been involved in reading to them, they would have already been exposed to nursery rhymes. In situations where the child is not read to, Kindergarten would be the first exposure.
And really, most kids would be exposed to nursery rhymes in Nursery School/day care. And, in impoverished areas, they would hear them at Headstart.