In my online course it says that asking where do you come from is like “D’où viens-tu ?” but I've watched a french beginner video and in the video it says “Tu viens d'où ?” for the question. I am guessing that it is only a matter of formality but I'm not sure if there is a rule or anything.
The video with the timestamp: https://youtu.be/V0mOUg3zK_A