Using Event Subscriber change the product custom field value after first checkout of that product Using 'Event Subscriber', I'm able to get $order and $items from the order after completing the checkout.

How can I get the product id from the $itemsand modify the product custom field value?

Scenario: I want to change the status of the product after completing the first checkout of that product.
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-&gt;getPurchasedEntity();. If you only want the first item you can access it like so $purchasedEntity = $items[0]-&gt;getPurchasedEntity();. 
In case the PurchasedEntity is a ProductVariation you can get the product with $product = $purchasedEntity-&gt;getProduct();

In case you want to change the status of the product:

$product-&gt;setUnpublished();


Or for the variation:

$variation-&gt;setActive(false);


If you want to set any custom field on the product variation:

$variation-&gt;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.