If your product is not available for delivery, pickup, or Shipping and you are looking to prevent customers from checkout then you just need to enable this “Prevent checkout” option from the Settings.
– Go to the Settings> Shipping> Calendar and checkout button settings> Prevent checkout
For Store Pickup:
– Go to the Settings> Store Pickup> Settings> Prevent checkout
For Local Delivery:
– Go to the Settings> Local Delivery> Settings> Prevent checkout