how to remove cart.js url in shopify code example
Example: remove product from cart shopify using product id
You can POST into /cart/change.js with quantity 0 and the id of the variant you
want to delete from the cart. More info here -
https://help.shopify.com/en/themes/development/getting-started/using-ajax-api#change-cart