“Is it so bad, then, to be misunderstood? Pythagoras was misunderstood, and Socrates, and Jesus, and Luther, and Copernicus, and Galileo, and Newton, and every pure and wise spirit that ever took flesh. To be great is to be misunderstood.” — Ralph Waldo Emerson
Would you not stand up and sing karaoke because others might laugh? Would you not come out of the closet because others might mock you? Would you not speak your political stance because others might disapprove? If you want a guaranteed shitty life, care about what other people think.
Caring what other people think comes from a deep absence of self-reliance: if you do not love yourself, you seek others to love you; if you do not value yourself, you seek others to value you; if you are not confident, you seek the confidence of others. The way, then, to not care what others think is simple: love yourself, value yourself, and be confident in yourself.