If you want to avoid shady software, do this:
Unlocking the bootloader allows you to root your device, install custom recovery (TWRP), or flash custom ROMs. nokia g50 unlock tool