Courts bring charges.
You really don't see the box you just put yourself in do you.
The judiciary does not make law. Congres does. Trump broke no law EDIT so there is no case before them from which a contempt charge could stem. If a court brings a charge, it is acting as executive, which it has no authority to do. If a court tries to enforce that charge it cannot because authority is vested in the executive. A court cannot bring a contempt charge for a non existant case before it based on the enforcement of a law that it cannot write.
So how do you suppose that some random judge simply waves a wand, legislates