Perhaps no human activity is so regularly engaged in and failed at as is the search for love and why is complicated. Early childhood experience is the bedrock of adult functioning. While none experiences a perfect parenting, one that is "good-enough" is needed to develop the capacities for trust and intimacy. If the parenting was deficient the adult's romantic relationships will suffer but this too it is not an absolute since varied capacities will exist.
Recognizing this, and responding to a lover's troubling behaviors with understanding not condemnation, can help maintain and develop the relationship. But with those who are greatly damaged, either from a critical lack of trust or having never learned that intimacy is comforting and not threatening, therapy is needed to heal the early life wounds. Which for some won't be easy since therapy involves dependency which also may have been believed dangerous as the child moved toward independence. Human development is not a simple task.