https://support.apple.com/en-us/HT202743
Choose to receive Test Emergency Alerts in the United States When your iPhone is connected to a carrier in the United States — using a U.S. SIM or while roaming in the U.S. — you can enable Test Emergency Alerts. By default, this is turned off. When you receive this type of alert, you'll hear a sound that's similar to an alarm, and the alert will mention that it's a test. To turn these alerts on or off, follow these steps: Open the Phone app and tap Keypad. To turn it on: Enter 500525371# and tap . You'll get an alert that says "Test alerts enabled." To turn it off: Enter 500525370# and tap . You'll get an alert that says "Test alerts disabled." Government test alerts are available with U.S. carriers, including Puerto Rico. Your local government is responsible for the content and the frequency of the test alerts. You can disable this feature anytime with the steps above. For more information, contact your carrier.