I'm guessing this is an M-series Mac? An M-series Mac has a new concept of "Ownership" and must always confirm actions by authenticating with an admin user account and also by checking the macOS system volume with hash codes from Apple's remote servers.
This means you must be able to connect this Mac to the Internet so it can properly communicate with Apple's servers. Sometimes just having Internet access is not enough since macOS, your local network, or even your ISP & local Internet could be preventing the necessary communication with Apple's servers. It is not easy to troubleshoot such a connection issue because Apple does not provide users with enough information or any way to test their connection allows for such things.
You can try performing a DFU firmware Revive procedure if you are using a 2018+ model Mac with either a T2 security chip or an M-series CPU as this will reset the security enclave chip & system firmware.
Otherwise you may need to contact Apple or an Apple Authorized Service Provider for assistance to find out if there is anything else you or they can do besides completely erasing the computer & starting over completely which would result in losing all data on the internal SSD if you don't have good backups.
FYI, it is always a good idea to always provide the exact model of your device when asking for assistance online so that suggestions can focus on that exact model & any of its unique issues. You can get the exact model by entering the system serial number on the check coverage page here, but please do not post your serial number on this forum since it is considered personal information:
Check Your Service and Support Coverage - Apple Support