when the first variable is stored its stored on data segment
I think there's a misconception. You need to make a distinction between the compile-time and the run-time.
It was your compiler (assembler) that put the msg1 text in the data section of your program. We don't actually call this storing a variable and furthermore there's no particular setting of the DS
segment register involved.
However at run-time, when you want to retrieve or store these variables, the DS
segment register needs to point at the data section. Since at program start this is not the case, it's up to you to do that explicitly.
1 data segment
2 msg1 db 10,13, "saisir le premier digit:$"
3 data ends
4 mov ax,data
5 mov ds,ax
Do note that the execution didn't start at the 1st line of this snippet of code, but rather at the 4th! That's another way to see that there wasn't any prior store on the data segment.