This is from the FDA fact sheet-
PAXLOVID is contraindicated with drugs that are potent CYP3A inducers where significantly reduced nirmatrelvir or ritonavir plasma concentrations may be associated with the potential for loss of virologic response and possible resistance. PAXLOVID cannot be started immediately after discontinuation of any of the following medications due to the delayed offset of the recently
discontinued CYP3A inducer [see Drug Interactions (7.3)]:
• Anticancer drugs: apalutamide
There's a complete list of medication contraindications here-