This Variable for Google Analytics 4 (GA4) returns GA4 Ecommerce Items as Data Layer Variable Version 1. This ensures that Google Tag Manager will only access the most recent Item push into the Data Layer.
The Variable removes the need for clearing the ecommerce object in your implementation.
The Variable requires no setup. The Variable is reading data from the Data Layer Key Part ecommerce.items, but as Variable Version 1.
Just install the Template, and add the Variable to your GA4 Ecommerce Tags as shown in the image below. Variable name used in the Tag example is {{ecom - items - DLV - V1}}).
The image below is from Google Tag Manager Preview Pane showing the result from a add_to_cart Event. As we can see the Variable from this Template (ecom - items - DLV - V1) is returning the item added to cart. The Data Layer Variable Version 2 (ecom - items- DLV - v2) is the item added to cart + a item from a previous Event which is not correct.