Symbiotic ways of feeding organisms arose during their evolution. And how do newborns learn this method?

They do not need to master a symbiotic lifestyle or way of eating. In the process of evolution, they also developed all the necessary devices for recognizing the necessary individual or substrate. For example, special receptors for the perception of another symbiotic individual or morphological structures that facilitate the process of nutrition. Moreover, most symbiotic individuals are born near the parent organism and immediately fall into favorable conditions for development.
Symbiotic behavior is transmitted from parents. For example, in birds or mammals in relation to bacteria.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.