Which city do youlike better, London or New York?

Which do you like better, London or New York?

What city do youlike better, London or New York?

What do you like better, London or New York?

----------------------------
Are all the expressions grammatical?
Which one is incorrect? Can we use 'what' instead of 'which' in this kind of sentence?

They are all correct, and yes, in many instances "which" and "what" mean approximately the same thing.

Be sure to put a space between "you" and "like" in the first and third sentences.

All of the expressions you provided are grammatical. However, if we want to follow standard grammar rules, "Which city do you like better, London or New York?" is the correct formulation.

As for the use of "which" versus "what," both can be used interchangeably in this context. "Which" is more commonly used when the options are limited or known, while "what" can be used in a broader sense when the options are open-ended. In this case, since the options are clearly defined as London and New York, both "which" and "what" can be used. So, "What city do you like better, London or New York?" is also grammatically correct.