Welcome to the Community!
It's only possible to block a phone number altogether, meaning that you'd be blocking both incoming calls and texts from that specific number.
To block a number, you can follow these steps here:
In Settings, go to Phone > Call Blocking and Identification. At the bottom, click on Block Contact and then select the contact you wish to block to add it to the list.
If the number in question is not in your Contacts, go to the Phone app > Recents, select the number, then scroll down and select Block this Caller.
Hope this helps