MacOS machines phone home to Apple when installing. If the machine is known to belong to the company, it can then send it off to an MDM server from a third party, who can install stuff.
But Apple does not know for all machines who owns them. Typically, you have to create an Apple Business Management account. And buy from Apple directly or via select resellers. The idea being that you can send it to staff directly without installing it.
You can attach a computer to your ABM account manually, but it requires reinstall and physical access. It involves faffing around with an iPhone that has Apple Configurator installed.
Also, if the machine has no internet when it is booted during install, it will skip the phoning home, and you can 'circumvent' the MDM