Basically create json file on your site at /.well-known/nostr.json
Place inside your username and the npub, done.
First: You can easily host a million user handles on a JSON file without impact on the website, you cannot host a million user handles as TXT record.
Second: It is far easier to update a JSON file on disk than using an API to a specific domain registrar provider and change TXT records there.