Short answer: Know who you are apart from the painful experiences of your past.
Long answer: keep reading.
You may not have thought of it this way, but people-pleasing is a form of control.
Deep down, you're hoping that if you do enough nice things for people, then they'll like you...and ultimately, you'll like yourself.
It's not necessarily harmful or intentional, but it is manipulative.
The need for control always comes back to a lack of safety (the inability to recognize one's inherent goodness), and this individual struggles with feelings of unimportance, insignificance, and inferiority.
More often than not, this comes back to a shortage of validation during formative years, where people-pleasing became the protective albeit functional method of filling in the emotional gaps that were never satisfied--and the pattern continued.
Of course, hardly anyone would recognize the driver behind this behavior, nor would they put it into these words.
Sadly, people-pleasing is a cry for love.
Though, the truth is, nothing outside of you can fulfill you.
Everyone in the world could like you, but if you don't like yourself, you wouldn't even know how to deeply and authentically receive kindness and generosity from others.
Healing this wound requires embracing the emotional labor of revisiting any experiences that have caused you to feel rejected, and sit inside of those encounters until you're able to separate them from your identity--this is a practice, not a one-time event.
Experiences ≠ Identity
Once you know who you are apart from what happened to you (the rediscovery of your True Self), you'll continue pleasing others, but because you're pleased with yourself.
"Once you know who you are, you don't have to worry anymore." Nikki Giovanni