No rule for this one
No ending or word group predicts the article of Schmerz. Learn it as a pair and say it out loud: der Schmerz.
der Schmerz
It's der Schmerz. Schmerz is masculine, plural die Schmerzen.
Wo haben Sie Schmerzen?
Where do you have pain?
Ich habe Schmerzen im Rücken.
I have pain in my back.
No ending or word group predicts the article of Schmerz. Learn it as a pair and say it out loud: der Schmerz.