Cardinals have in canon law a "privilege of forum" (i.e., exemption from being judged by ecclesiastical tribunals of ordinary rank): only the pope is competent to judge them in matters subject to ecclesiastical jurisdiction (cases that refer to matters that are spiritual or linked with the spiritual, or with regard to infringement of ecclesiastical laws and whatever contains an element of sin, where culpability must be determined and the appropriate ecclesiastical penalty imposed). The pope either decides the case himself or delegates the decision to a tribunal, usually one of the tribunals or congregations of the Roman Curia. Without such delegation, no ecclesiastical court, even the Roman Rota, is competent to judge a canon law case against a cardinal. Cardinals are, however, subject to the civil and criminal law like everybody else.
Who is the only person who can judge a Cardinal in regards to laws of the church?
the pope