I have a Nokia 6 and whenever I try to unlock my device I am facing error.
sudo fastboot oem unlock
(remote: oem unlock is not allowed)
HMD has not yet allowed the bootloader unlock of Nokia 6, so you have no chance :(
Nokia phones do not currently allow unlocking of the bootloader. So, you cannot unlock the bootloader even if you have enabled "OEM Unlocking" in Developer Options.
It doesn't unlock because Nokia Mobile has locked them with an encrypted key and it is needed to gain temporary access of complete a full-unlock of the bootloader.
There is an unofficial (and paid) method available which you can use if unlocking is important for you.
Nokia/HMD are also showing some signs that they will allow unlocking of the bootloader. Official unlocking is enabled for Nokia 8 device owners and chances are that this will be expanded to the other phones in the future.