I have override two core checkout xml file for override default.phtml file in magento 2
as per ref url -

https://magento.stackexchange.com/questions/146423/overriding-template-not-working-in-magento-2

But when I add configurable product in my cart, then its global attributes like color and size are not visible on cart page.

app/code/XYZ/Checkout/view/frontend/layout/checkout_cart_index.xml

	<?xml version="1.0"?>
	<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
	    <body>
	        <referenceBlock class="Magento\Checkout\Block\Cart" name="checkout.cart.form">
	            <block class="Magento\Framework\View\Element\RendererList" name="checkout.cart.item.renderers.override" as="renderer.list.custom"/>
	            <arguments>
	                <argument name="renderer_list_name" xsi:type="string">checkout.cart.item.renderers.override</argument>
	            </arguments>
	        </referenceBlock>
	    </body>
	</page>


app/code/XYZ/Checkout/view/frontend/layout/checkout_cart_item_renderers.xml

	<?xml version="1.0"?>
	<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
	    <body>
	        <referenceBlock name="checkout.cart.item.renderers.override">

	            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="default" template="XYZ_Checkout::cart/item/default.phtml" />              

	            <block class="Magento\Checkout\Block\Cart\Item\Renderer" as="simple" template="XYZ_Checkout::cart/item/default.phtml" />   

	        </referenceBlock>
	    </body>
	</page>