My friend got a new MacBook Pro from office, later on he resigned and in a hurry erased the "Macintosh HD", now we are trying to install Mojave using Bootable USB but it won't allow because "External Boot" is not allowed, also when we try to access "Startup Security Utility" it shows an error saying no administrator was found, so we can't enable "Allow booting from external media". Somehow online installation from recovery mode is also not working and throws 202 error at the end. Is there any luck?
You need to take it to an Apple Store. The SecureBoot settings can't be changed unless there is a valid admin user, so you can't boot to an external. Recovery is your only other option, and that's not working.
I had a similar issue with my 2018 Mini: I had to run the "Welcome to Mac" routine and create a new user before I could alter SecureBoot, even though the disk had been imaged with an admin user. I suspect the T2 chip needs to be informed.
PS. I'd love to work somewhere where you get to keep your laptop when you resign!