I’ve heard this in various different ways, but the main point to take away is “you need to have a good relationship with yourself before you have a relationship with anyone else”. And that is very good advice.
If you have a bad relationship with yourself you’re more prone to jealousy, insecurity, and causing rifts with your partner. These things can seriously harm a relationship to the point of breaking up.
These things come out the most when you love someone and you don’t want to let them go.
When you don’t have a good relationship with yourself, you’re not mentally ready to have someone else come into that space with you. It’s hard to admit at times, but I find that when I have problems regarding relationships it’s because I’ve been neglecting the relationship I have with myself.