You can not

You can set the customer credit limit to zero, and when you create an invoice QB will warn you that you are exceeding the limit but not stop you from saving the invoice

you can edit the customer name and enter do not sell/ship

but nothing in QB will stop […]

Resolution for 'block a customer issue: 'How can I block a customer from an order being shipped?' available: Yes.

The block a customer issue or error code is a known issue in Quickbooks Online (QBO) and/or Quickbooks. Support for this issue is available either by self-service or paid support options. Experts are available to resolve your Quickbooks issue to ensure minimal downtime and continue running your business. First try to resolve the block a customer issue yourself by looking for a resolution described in the article. If it is a complex block a customer issue or you are unable to solve the issue, you may contact us by clicking here or by using other block a customer support options.

For more information about resolving issues related to block a customer in Quickbooks/QBO or to get support for the issue 'How can I block a customer from an order being shipped?', click the link below: