We will see how Linux decides the default permissions of the newly created file or folder:
$ umask 0002
The meaning of the preceding output is that, if we create a new directory, then, from the permissions of +rwx, the permission 0002 will be subtracted. This means that for a newly created directory, the permissions will be 775, or rwx rwx r-x. For a newly created file, the file permissions will be rw- rw- r--. By default, for any newly created text file, the execute bit will never be set. Therefore, the newly created text file and the directory will have different permissions, even though umask is the same.