This is a good question. Let me give you a few points to answer this question.
In the opening scene of the work, Oedipus is the able king of Thebes. However, there is a plague. The people of the city and the livestock are suffering immensely. When they inquire why there is this plague, the oracle of Delphi states that it is due to the murder of the former king, Laius.
In light of this, there is an impulse to find out who this murder is either to execute him or exile him. It is this search for the murder of Laius that sets in motion Oedipus' desire to find his true identity. Through the blind seer, Tiresias, Oedipus slowly begins to see that he is the one who is responsible for the plague, as he killed his father and even married his mother.