The checkout URL’s work correctly. If it does not work, that means the ID is wrong.
The ID needs to be the variant ID.
Or if you are submitting a Shopify ID, that looks like shopify_US_12345678_123456789, then Google will automatically choose the last part of the id for the cart.
I have set this up with many shopify accounts, so if it doesn’t work, it generally means you have not done something correct or the id is not a SHopify ID, but an SKU instead.