Then why do you distinguish this? The main reason is that the computer allocates different memory space when storing data. If int (integer) is defined, it will allocate the corresponding integer size, such as 4 memory cells.
Then why did I say, for example, four memory cells? The reason is that different CPUs allocate different memory. The int allocated by a 32-bit CPU is four bytes. As for why, this is determined by the hardware design (32 bits /8=4 bytes).
To sum up, you should understand that each variable you define will be allocated a piece of memory, and the size of the allocated memory depends on your data type.