The Sages say, “One who raises an orphaned boy or girl in his home is considered by the Torah as if he gave birth to them” (Megilla 13a). This refers not only to an orphan who has lost both parents, but also to a child whose parents are unable to meet all his basic physical and emotional needs, as the source for this assertion is a midrash that extrapolates that Moshe Rabbeinu is referred to as the son of Pharaoh’s daughter Bitya even though his biological mother, Yocheved, was alive and nursed him. Since Bitya raised him, he is regarded as her son as well.
The Sages also say (Ketubot 50a) that one who raises an orphaned child and marries him off is considered by the Torah as one of those “who do righteous deeds at all times” (Tehilim 106:3). According to the Midrash, God has treasure houses full of rewards for the righteous. Among them is a special warehouse with rewards for those who take in orphans and raise them (Shemot Rabba 45:6).
Some even maintain that a couple who raises an orphan actually fulfills the mitzva of procreation. This approach takes literally the Sages’ statement, “He is considered by the Torah as if he gave birth to them” (see Ḥokhmat Shlomo, EH 1:1). Even according to the poskim who maintain that the equation is not literal, from a certain perspective, this couple performs an even greater mitzva because they act voluntarily.
Similarly, we find that even though adopted children are not technically obligated in the mitzva of honoring parents vis-à-vis their adoptive parents, Torah ethics obligate them in everything that is incumbent upon biological children. Perhaps they must do even more, since their parents adopted them voluntarily. Similarly, it is a mitzva for adopted children to mourn for their adoptive parents and recite Kaddish for them. The only difference between an adopted child and a biological one is that the latter may not perform a medical procedure on a parent if it would cause bleeding, while the former may (Peninei Halakha: Collected Essays – Mishpaḥa 1:24-25).
Someone who would find it difficult to raise or help raise an orphan can donate money to help abandoned children, provide for their needs, and get them on their feet. In doing so he is a partner in raising them, and from a certain perspective it is as if he has given birth to them. The more significant the help he gives, the truer this is.
People who help parents care for and educate their children are also considered parents on some level, as it says (Ruth 4:17), “The women neighbors gave him a name, saying, ‘A son is born to Naomi!’ They named him Oved; he was the father of Yishai, father of David.” The Sages explain that the reason that Oved, son of Ruth and Boaz, is also called Naomi’s son is because she was involved in caring for and educating him (Sanhedrin 19b).