Add spammers phone as a contact, then select "all calls to voicemail" for that contact.
You absolutely can block such numbers in the stock Android phone app; some online sources indicate iOS lacks this basic feature, but I don't know if they are accurate and current.