For websites I owned, I am using two services: namecheap (a domain name registrar) and digitalocean (a cloud platform). Here, I show how to quickly verify a domain ownership for google Search Console via DNS record:
Note: Herafter I assumed that you already have a domain name registered (if not you can go on namecheap for example, create an account and register a new domain name. It takes only 2 minutes)
Step 1: Google Search Console
Let's first add a new property in Google Search Console:

then enter your domain name:

next we will verify domain ownership via DNS record for that copy the code that google gives you:
google-site-verification-*******

do nothing and open a new tab in your browser.
Step 2: Go to Digitalocean
Go to your Digitalocean account
Note: if your domain name is not yet routed to digitalocean, just click on the green "Create" buton and go to Domains/DNS (see image below)

Then click on your domain name

Select TXT

enter the code that google gave you (see step 1) and @ for your hostname.
Step 3: Verify domain ownership
Go back to Google Search Console click on Verify. A message with Ownership verified should appear:

And you are done !
