Registering a domain anonymously can have various reasons. You don't want others to see who owns the domain based on the Whois record. This can also protect you from unwanted spammers. However, there are differences in which ending you want. Country-specific domain names require a place of residence in the respective country. If you are not resident in this country, there are hosters who offer an escrow service. With an escrow service, the hoster/provider is set as the owner of the domain in the Whois entry. However, you have a contract with the provider that all rights to the domain remain with you.
Register a non-country specific domain (e.g. .com) it's easier. No special place of residence is required for these domains. Here, too, the hoster is entered as the owner in the Whois data. However, you do not need an escrow service, which is usually subject to a fee. This is called privacy protection and is offered by many web hosts for free or for a small fee.
However, even if you operate an anonymous domain, remember that the laws where you live always apply. For .de domains, for example, there is still an imprint obligation. If you really want to host completely anonymously without risking a warning, you can also register a company in the respective country. There are a number of sites on the internet that offer to set up a company abroad. Offshore countries are very popular here (Panama, Netherlands, UK). If you also want to remain anonymous to the hoster, it is best to choose a provider that accepts Bitcoin. Many hosters basically offer this, that you can remain anonymous.
Here are some domain extensions for which you do not need an escrow service. Anonymization of the Whois entry is easily possible (privacy protection):
.com, .net, .org, .info, .biz, .name, .mobi