Albert Camus said this quote

You are only excused for happiness and success if you generously agree to share them. But if one is to be happy, one should not worry too much about other people - which means there is no way out. Happy and judged or absolved and miserable.