magento2 – How to remove shipping from Cart (Magento 2.4)

I am trying to remove the Shipping & Coupon container from the /checkout/cart page. I tried to copy the XML file into layout/override/base and edit it, but then I get blank page on /cart.

A simpler way would be by hiding it via CSS, but I am trying to do it programatically and proper way.

Currently I have following container as shown in the image, which I want to disable from the cart page.

enter image description here

And the code to show this container exist in vendor/magento/module-checkout/view/frontend/layout/checkout_cart_index.xml , I also tried to comment out the block inside this file, but then everything gets messed up i.e. checkout process too.


I was able to do it by following this however, I had to edit the actual XML file, if I place the code in override/base/XML then it doesn’t work, and I get a blank page. Why is that?