It seems you’ve seen this here.
The explanation is what is there on the link.
In an instruction of the kind
mov [ESI], al ; Store a byte-size value
the Assembler (masm, tasm, etc.) knows which machine instruction to use, because the origin is the AL register that has 8 bits (1 byte).
In an instruction of the kind
mov [ESI], 5 ; Error: operand must have the size specified
the Assembler does not know which machine instruction to use, because "5" can be a byte with value 5, or a word with value 5, etc.
Then you need to give the Assembler more information so it can generate the right machine instruction:
; move o valor 0x05 (8 bits) para o byte cujo endereço está em ESI
mov BYTE PTR [ESI], 5
; move o valor 0x0005 (16 bits) para a word cujo endereço está em ESI
mov WORD PTR [ESI], 5
; move o valor 0x00000005 (32 bits) para a double-word cujo endereço está em ESI
mov DWORD PTR [ESI], 5
Note that although the Assembly instruction is the same in these 3 cases (MOV) actually the machine code is different, so the Assembler program (masm, tasm, etc) needs this additional information: byte ptr, word ptr, dword ptr.
PS. in my previous answer on this subject I did not worry much about it, by guarantee I used byte ptr, word ptr, maybe even in places where it was not strictly necessary.