Webflow does not support dynamic anchors with the CMS, but there is a workaround that is to use the component Embed and create your own button and dynamically extract the anchor from your collection.
Here's how to do it! ✌🏼
Define the link using the CMS “slug” field (you can use any other CMS field for this or even create an additional field, but the “slug” field does the trick).
Define theID as being the same CMS field as the one used in point 1 (the {slug} in my case)
You can test the result in the editor Webflow directly