You can't force a character to be disliked or liked. But IMO, a disliked character is one that is unreasonable and is an annoyance to the story. A good example would be Rachel from Tower of God (highly recommended webtoon to read). She was willing to kill her only true friend, the MC, because of jealousy of his talent. Furthermore she spouts about wanting power and defying fate, yet she has no true power and is always getting carried by others who initially used her as a pawn. In general, if you want your character to be dislikable while also giving them depth. Imagine somebody in your life that frustrated you or just don't like them. Jot down the behavior you recalled and extrapolate from their.
Also, most shounen characters or CN protagonist are disliked due to their hypocrisy or flawed ways of thinking or achieving things. Such would be Chu Feng, who is walking dickhead due to all the dumbshit he does.