If you lack confidence, and feel not good enough, one of the flow on consequences is that you might look for the approval of other people in order to feel better and boost yourself.
This doesn't necessarily happen consciously. Instead, you unconsciously end up doing things and saying things in order to seek the validation from other people.
But as you might know, that's a risky strategy, because sometimes you'll get that approval and validation, and sometimes you won't. This isn't because of YOU or anything to do with your value. Nor does it have anything to do with what you do or say. It's just that other people are unpredictable and how they behave toward you has little to do with you and more to do with their mindset and mood at any given moment!
So, instead of looking for other people to validate you, it's time to validate yourself!