The simple realization that everybody cannot like you and you cannot please everyone is a life hack.
Why because so many factors come into play on how people make such decisions and most are NOT about you.
There’s no magic way of building self-confidence.
Confidences come from being yourself and showing that you can succeed. It also comes from others recognizing that you’re good at some particular skill and letting you know that they