Sudden change in the area of research I am a third-year Ph.D student of computer science and engineering (I joined a direct PhD program after my bachelor’s in computer science). I am working on theoretical computer science.

In the first two years, I did the course work plus some survey of the field called theoretical computer science. To get anything published in XYZ is more challenging (as well as requires more time) than the abc. I am more interested in the ABC than the XYZ. It is not that I am not interested in ABC side, I am very much. In the first two years I have explored XYZ side. I also did three to four courses related to ABC techniques.

Now my supervisor is saying that I should “be open to both XYZ techniques as well as ABC techniques”. I am confused what to do. Is it normal? I have not started my thesis yet.
Speaking as a combinatorist, you'll be better off being open to both subfields from a knowledge point of view.

Remember: what you choose to write your thesis on does not determine what you'll study for the rest of your life. Especially when we are talking about two subfields so closely related.

If you want to be at a university the state of the fields now matters pretty little, comparatively to the date of the fields in 10-15 years. If you want to enter industry, it's unlikely that the subject of your dissertation matters much at all (field, sure. But subsubdiscipline? Not at all).

Listen to your advisor.