The first step you must enter into Google AdSense here. Then enter the site menu. Then select “DOWNLOAD”.
After you download “ads.txt” you upload it on your WordPress cPanel in the “public_html” section.
Now you try the test by entering into your website then in the back it will add /ads.txt. Examples like this are infosolution.biz/ads.txt
May be useful 🙂