Could you please confirm whether you have a limited company or if you’re registering as an individual? If you’re an individual, that’s absolutely fine; you can sign up as a Sole/Individual Proprietorship for the Apple Developer account, and in that case, a DUNS number isn’t required.
However, for the Google Developer account, a DUNS number is mandatory, which means you would need to register your business first.
You can obtain a DUNS number for free here: https://www.dnb.com/en-us/