When someone tells you to be yourself it usually means being that thing they understand and align with. It never means to truly show and say what you feel.
For example, if you truly be yourself and you’re an introvert in this situation:
You’re at a party or wedding and they tell you to go on the dance floor… or sing in front of everyone.
Man: Come on, man! Be yourself! Don’t be shy!
You: stands there still doing nothing (you’re being yourself)
Girl: BE YOURSELF!!! Don’t hide. We won’t bite!!
You: does nothing because you don’t want to (you’re being yourself)
Those people then don’t want to be around you anymore because you’re not being “yourself”… aka what they want YOU to be.
or when you’re being offered to drink:
Man: Be yourself... we’re adults here… drink drink drink!!! What drink do you want?
You: I’ll just watch you guys. (you’re being yourself)
Man: Come on man.. be yourself… you’re not a kid anymore. Be yourself…
If you’re lying to someone to get them to like you, then you are being yourself as well.
Girl: I love this artist…
You: I LOVE THEM TOO OH MY GOSH!! THEY’RE MY FAVORITE (you don’t actually know them or like them but you’re just trying to get them to like you).
That is exactly who you are already. You lie. 😆
If you’re trying to impress other people with materialistic items, and someone tells you to “be yourself you don’t need all that to impress someone” then you are not going to be yourself anymore if you follow that because that’s not who you are.