Bootloader Unlock Question: Motorola
First check whether you phone can be unlocked: https://support.motorola.com/us/en/solution/MS87215

If yes then you need an unlock code, to get this code and unlock the boot loader follow the instructions at https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a

It is not possible to root your mobile without unlocking it.