perhaps foolish is a more specific term.

If you’re people-pleasing people you think are foolish, then you’re doing it wrong.

For however you define foolish (ignorant, arrogant, undisciplined, etc.).

On the flip side, you should probably be liked by the sorts of people you think are wise.

And you should endeavor that everyone treats you fairly.

Which answers the question: “is it better to be liked or respected?”

Respected by everyone. Liked by those you wish to be liked by.