The method to add a device to your Microsoft account using a serial number is only available for Microsoft manufactured devices, like a Surface laptop... etc.
For all other devices, ensure you log into the device with your Microsoft account, then ensure the Location Services setting and the 'Find My Device' setting is enabled in the Settings app, your device will then be automatically be added to your Microsoft account, that will not happen immediately, but it will happen eventually, because there is a widely reported problem with devices not showing up on the Microsoft account online, it is a server side problem Microsoft needs to fix.