Ah, what is the main theme of Sophocles' Oedipus Rex? Alas, this is a question that has been the subject of much scholarly debate and it is impossible to boil this play down to a single theme. I would suggest a couple of possibilities, though.
On one hand, we hear Sophocles talking a lot about discovering one's true identity in this play. Finding out who we really are is one of the major questions of life. Are we really the sort of person we think we are? Are we the sort of person others think we are? Are we the sort of person God knows we are? Oedipus discovers something really terrifying: he finds out that he is not who he thinks he is; he is not who people think he is; he is the person who God told him he was.
On another hand, Sophocles also seems to have some interesting things to say about the human desire to discover the truth. Even in the face of dire consequences, Oedipus is relentless in his pursuit of the truth. He has to unravel the mystery of Laius' killer, even if it means that he himself killed Laius and married his mother:
With all these indications of the truth
here in my grasp, I cannot end this now.
I must reveal the details of my birth. (Ian Johnston translation)
Humankind, like Oedipus, also seems quite relentless in its pursuit of the various mysteries that present themselves, even if the consequences are dire (e.g., the mysteries of human DNA which could lead to the cloning of humans).
In sum, Oedipus Rex has numerous themes, but, to be sure, these themes are enduring ones which cause this play to continue to be read and performed.