For the many people who had emotionally immature parents (or parents whose care fell somewhere on the spectrum of abuse), they may have never experienced a reliable caretaker. This can result in looking to friends or romantic partners to play the part of the parent they never had. It can also show up as having been parentified as a child, meaning having had to grow up and be the responsible adult or parent within the parent-child dynamic. Both of these scenarios can cause difficulty in adult relationships, but can be addressed in therapy.
Going to therapy and working with a therapist who is the right fit for you can help you internalize a new healthier and unconditionally caring voice or part within yourself. Building up trust that your inner parent part is capable of taking care of your inner child part along with all your other parts reduces the need to completely rely on other adults to take care of your needs.
The healthiest adult relationships occur when both individuals are capable of trusting themselves to care for themselves, and trusting one another to do the same. Neither person needs to parent the other, and the learned helplessness and learned parentification (often expressed as anxious and avoidant behavior, respectively) begins to decrease in the presence of trust and secure attachment.