When you create an Adsense account, depending on your use case, Google may ask you to upload and ads.txt file to your root domain level as verification.
To do so, you would need to create a new Pages page as described here: Pages Overview
Here are the steps to follow:
1. As an Editor, go to Pages
2. Click "Add", and select TXT as your new file type
3. Make sure that you put in 'ads.txt' as the file name and don't assign it to a section to keep it at the root level.
4. Click "View Source"
5. Paste in the text (string/characters provided by the AdSense according to their instructions)
6. Save and publish
7. Visit the URL before you let Google know it is available
It basically works the same way as verifying your site for Pinterest. See the "Verify With HTML" section of this article: Verifying your Site with Pinterest