I suppose you are using Shopify Payments. Unless you have an advanced use case, you should not have to worry about hreflang tag attributes, Shopify automatically adds them in the tag for you based on the available languages and regions used by your store.
You can see on this screen capture there are 5 of them, including the default one:
So yours are duplicate, what’s more they use a canonical rel attribute instead of the rel alternate attribute. From what I can see, I’d say you shoud most likely remove the code you added and leave it as it was initially, which I suppose are those 2 lines:
I took out the two lines. Although, Shopify automatically does this SEMrush and Google are both detecting hreflang errors how can I fix these issues as they directly effect my SEO.