Coincidentally thats my setup rn. Hosted my domain dns myself using technitium. Then i further xafr icann root zone and setup dns over tls. The dns over tls queried the local icann root zone copy i got. Its also blocking ads and tracker craps. Basically self reliant dns.
Can be done with bind9 too but i prefer technitium gui than bind9 cli.
Nothing stopping you to decouple both registrar and dns hosting. Its like people doesn’t realize it could be done. Wanting to use cloudflare dns doesn’t mean you got to transfer your domain to them, just change nameserver of your domain at whatever registrar you use to cloudflare nameserver.
Hell you could selfhost your domain zone yourself if you wish so.