“Contempt of court” is a term of art, and it’s possible to be held in contempt of court without actually having any particular contempt for the court. If the court orders you to do something, and you don’t do it—because you forgot, or because you had other priorities, or because you are a big company and it’s hard to get everyone to comply with a court-ordered policy—you might be dragged back into court and held in contempt, even if your personal feelings about the court are neutral or abstractly respectful. On the other hand, if you go around giving television interviews about how much contempt you have for a court order, and also you violate it, then you are asking for trouble.
After Elon Musk (1) tweeted some material false statements about taking Tesla Inc. private, (2) settled the resulting securities-fraud charges with the Securities and Exchange Commission by paying a $20 million fine and agreeing to have his tweets pre-approved by a lawyer, (3) went on television to say that he is not getting his tweets pre-approved and that “I want to be clear. I do not respect the SEC. I do not respect them,” and (4) again tweeted material false statements about Tesla’s production projections, I think it is fair to say that he is in contempt of court? The SEC sure does anyway: