My understanding of it was that relying too much on what other people think about you is bad. Rey knows she has a good heart, and that’s all that matters in the end. You can’t let other people tell you who you are. Only you know that.
The final challenge Rey faces before fully accepting that idea is Palpatine claiming that if she kills him her friends will be saved and they’ll all praise her for it. But she rejects his offer, counting on Ben and her other friends to help save the day instead (which is wiser, and relies less on what she would get out of the victory).