You can do it online, via phone and via chat.
https://www.att.com/shop/wireless/services/purchase_blocker-sku6800254.html#fbid=jJpKKRgYduP
Purchase Blocker is a free service that allows you to block your smartphone or tablet from buying mobile purchases and subscriptions (such as apps, games, and more) that would be billed directly to, or deducted from, your AT&T account. Purchase Blocker does not restrict mobile purchases made with credit cards or other forms of payment.
Please note: When Purchase Blocker is on, current subscriptions billed on your AT&T account will be canceled, and one-time purchase attempts will be unsuccessful (including one-time charitable donations).
To set up Purchase Blocker for your wireless number, chose one of these easy options:
Start a live chat session with an online representative.
Log in to your account at att.com/myatt and select Add or Change Services.
Contact Customer Care at 800.331.0500, or 611 from your smartphone.