remove item by line ajax 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