I pointed my domain nameservers (in the regristrar) to a DNS provider (Cloudflare). Then I created two NS records pointing to my hoster nameserver. Registrar -> DNS provider -> hoster. But it doesn't work. I want to use an intermediary to be able to change hoster fast. Besides, I tried to add these values to my registrar. (names are examples) ns1.hoster.com ns2.hoster.com ns1.cloudflare.com ns2.cloudflare.com That is, I want to use cloudflare as a NS backup. But intodns.com says the configuration is not good.
That is simply not how it works. Your authoritative DNS servers must contain the appropriate information which includes themselves as your DNS servers.
You also can not decide that a DNS server will be a backup DNS just like that, especially if you're not the administrator of that server. Configuring a DNS slave requires configuration on both the master and slave and most hosts won't allow any special requests that their automated system is not set to accommodate.
The best way to allow easy and fast change of host is to configure your DNS zone on Cloudflare to reflect the host's values for email (MX) and hosting (A and/or AAAA) with a short TTL. The short TTL is what will allow you to quickly change hosts.
Note that the TTL is not an absolute law and some DNS servers around the world may not want to respect a TTL that may cause their server an undue load, but many will respect a TTL of 30 minutes or more.