The present invention covers 2-hetarylpyrimidine-4-carboxamide compounds of general formula (I): in which X, Y, Z, R1, R2 and R4 are as defined herein, methods of preparing said compounds, intermediate compounds useful for preparing said compounds, pharmaceutical compositions and combinations comprising said compounds and the use of said compounds for manufacturing pharmaceutical compositions for the treatment or prophylaxis of diseases, in particular of cancer or conditions with dysregulated immune responses or other disorders associated with aberrant AHR signaling, as a sole agent or in combination with other active ingredients.