Spoofed texts

How can you tell if you received a spoofed text from an attacker

You can ask the owner directly from where you received the text. Also a good way is to not open any links sent to you that you think can be malicious. I assume you are talking about sms on a phone so spoofing it is easy if you have proper setup of equipments. There is no way to know if the text is spoofed on your own.