When registering a device on a Microsoft account online, the serial number method is only available for Microsoft manufactured devices, like a Surface laptop.
For all other devices, ensure you log into your device with your Microsoft account, then in the settings app, ensure you have the Location Services setting enabled for all apps, and also enable the 'Find My Device' setting, your device will then get linked to your Microsoft account automatically.
It may take some time for your device to appear on your account online, because there is currently a widely reported problem where devices that are correctly registered to the account do not appear online, this is a server side issue that Microsoft need to fix.