This is the only way I found.
Go to the phone app call history.
Touch the entry and hold down the finger
Copy number to clip board
Add it to contacts with a name such as "Spam Block"
(in future you can all add numbers to be blocked to the same contact)
Then in your Contacts app, use the ... menu on top right to "Add to block list"
Now the block should work, but even if it does not, the caller ID will show
"Spam Block" next time, so you need not answer the phone call.
I would be cautious about downloading apps such as "True Caller" and "Should I answer"
because those apps may copy all your contacts to their central database - you are giving them permission to do so by using the apps.