Here's how to block messages and send unwanted calls directly to Voicemail for your Pixel 6 / 6 Pro.
Tap the
Menu icon

then tap
Settings
.
Do any of the following:
Add Block
Add the number to be blocked.
Tap
Block
.
Calls and messages from contacts or phone numbers added to the block list are automatically ignored. The call is forwarded to Voicemail and text / picture messages aren't delivered to the Messages app.
Remove Block
Tap the
Remove icon

to the right of the blocked number.
If calls from a specific number go directly to Voicemail but you're still able to receive text messages, ensure the contact isn't set to automatically route to Voicemail by navigating:
Contacts
, select the contact, tap the
Menu icon

then tap
Unroute to voicemail
.