If you have only the one device and have two-factor authentication, it would
make almost no sense to get such a text. ~ Unless it was an unauthorized try
at gaining access to your Apple ID account. The article linked tells how to set
and use the two factor authentication, if you don't already use it.
[Wasn't aware the Apple system would be so lax and trust SMS/MMS for this.
Probably why they don't use common SMS MMS text for Apple ID verification.]
Some users with older AppleID & earlier two-factor verification may be at risk.
{A problem with logistics may arise if you only have one device and set up
the verification, and have no other safe device to use when needed; then
you would be unable to act on a real event with two-factor authentication.}
Reason for some with older two-factor setup, to remain there - with one device.
In any event...
Good luck & happy trails! 🙂