people showing themselves as more valuable than they are

Of course, it is difficult to talk about whether a person is valuable or not. I am not someone who has the authority to judge this. However, there is something I observe in daily life. Many times, before meeting new people, I was told how wonderful that person was. However, after we met, I realized that people who need to portray themselves as cultured, knowledgeable, kind, and well-intentioned are generally egoistic people who want to achieve these things but are not developed in terms of empathy or culture. However, people I meet completely randomly with a bad image can turn out to be very good quality.

Many people have noticed these, but there is something I cannot accept. Why are cheap people who market themselves at high prices valued? Decent people are so lonely and unappreciated. Of course I know the reasons. However, I cannot accept this situation. In addition, it can be challenging to understand which of the two classes each new person we meet belongs to. People who seem very good at first can later unmask themselves. How do we avoid such situations? How can we distinguish between quality people and people who seem to be quality?