Since this was just a test only devices that were enrolled in the WEA test got the message.
Source: https://www.fema.gov/event/ipaws-national-test
“The WEA test will be directed only to consumer cell phones where the subscriber has opted-in to receive test messages, which will be in either English or Spanish, depending on the device’s language settings. Most mobile phones will not display the test message. In contrast, consumers will automatically receive real emergency alerts on compatible phones (even if they do not receive the test message).”
For instructions on how to enroll: https://www.fcc.gov/sites/default/files/weatest_opt-in_instructions.pdf
If you are referring to the 2018 alert, that one that trump did was very special, it was a "Presidental Alert" that style of alert is very unique, it cannot be turned off by any phone, but it required a software update to be enabled on your device.
"FEMA’s test of a new third kind of alert — the presidential alert — was designed to alert every switched-on phone with cell service across the U.S. at roughly the same time.
You might have noticed that when you received the alert, it was sent directly over the cellular network. Sending tens of millions of text messages would have ground the cell networks to a halt. Although today’s alert was sent by FEMA, any future presidential alert can be sent solely at the discretion of the president and can be issued for any reason. And, unlike other alerts, Americans can’t opt-out of receiving a presidential alert."
Source: https://techcrunch.com/2018/10/03/fema-is-about-to-send-a-presidential-alert-to-millions-of-u-s-phones/
I never got the presidential alert, either.