To go against the grain / To swim against the tide
Describes choosing a path or holding a view that goes against what most people do or think. Can be admired or criticised depending on context.
She always goes against the grain, she never follows trends.
Swimming against the tide is difficult but sometimes necessary.
—Doesn't he care what people think? —No, he goes against the grain without a problem.