The only smartphones I have used are androids and know for sure that after the call goes to voicemail you can click on the call for more options and and block the number. Not sure if it gives the option during the call unless it suspects it is spam. I just double checked on a number that wasn’t in my contacts.
May not be available on every model, but every one I have owned had the block option.
That’s a good idea, I’ĺl leave myself a note to remember!