There are several reasons people may not like you.
The first, most simple reason - you really do something to offend or annoy people in general. If so, try to find out what it is.
The second, you are pushing their buttons in some way. You might not be aware of this. For instance, let's say you talk about your job very positively, and unknown to you the person you are talking to just got fired, feels a failure, can't get a job or keep one, etc. The more you enthuse about your own situation, the worse they feel about themselves.
Since you can't always see people's buttons - they're often deep and there since childhood - it isn't always easy to prevent this. People often can't see them themselves and will rationalize their dislike of you. Asking them why they dislike you won't necessarily help. They will come up with a reason but it won't be the real reason. People can twist things you say and do and use this to justify their hostility.
Thirdly, they are resentful or jealous in some way. Maybe they think you have a better job or more money or a better life. This is in them, not in you. They might be better off than you in so many ways, but they will still find a reason to be jealous if it's in them.
Frankly, if your behavior is the cause of people disliking you, it's in your hands to change it. If it's in the other person, it's harder. For instance, if a person has to be "one-up" on you all the time in every way, they will turn against you if you don't stay in your place. Don't succeed at anything whatever you do! In many cases, it is important to recognize that the problem is the other person's and don't diminish yourself to gain their approval. First of all, you must like yourself.