Do you really want to change the status of the product or the product variation?
$items
is an array of OrderItems. If you loop over the items, you can get the referenced purchased entity of the single item with $purchasedEntity = $item->getPurchasedEntity();
. If you only want the first item you can access it like so $purchasedEntity = $items[0]->getPurchasedEntity();
.
In case the PurchasedEntity is a ProductVariation you can get the product with $product = $purchasedEntity->getProduct();
In case you want to change the status of the product:
$product->setUnpublished();
Or for the variation:
$variation->setActive(false);
If you want to set any custom field on the product variation:
$variation->set('your_custom_field_name', $value);
docs
This assumes you use the default commerce2 product architecture. It is absolutly possible that you get other purchasable entities than ProductVariations back from the OrderItem.