this is a tricky one if you are lacking in self-confidence or social skills. When I was younger I tried to be pleasant (or my interpretation of what I thought is pleasant) and came across as boring or a pushover. So I went the other way and became a jerk which I didn't do well either. Now I am a little more balanced but it took me decades to get there.
So I think the advice should be to be pleasant but also not to try to be liked by everyone all the time. Be a complete person with boundaries and be friendly as long boundaries are not crossed. Also have goals and don't be afraid to express them.
An important thing that many people can't seem to understand is how to convey boundaries. I feel like the main separator from an unlikable individual from a likable one is how they express their dislikes to others. Tact is one of the most valuable skills one can have.
The feedback loops are very long so it can be very frustrating to keep trying and failing. It’s also not easy to tell whether something is working or not.
The feedback loop is much longer in some situations than others. If you do something where you're regularly meeting new people you'll end up with much faster feedback on how pleasant your behavior is, and the cost of social missteps is lower.
So I think the advice should be to be pleasant but also not to try to be liked by everyone all the time. Be a complete person with boundaries and be friendly as long boundaries are not crossed. Also have goals and don't be afraid to express them.