Webflow doesn’t support CMS dynamic anchors but a workaround would be to use the embed component and create your own button and dynamically pull the anchor from your collection.
Pretty sure my answer will come too late for you @zooro7120, but maybe it’ll be useful to someone else. The solution proposed by @palombokevin works fine:
(1) Insert a “custom code” element at the point where you want to link to the anchor element and set the link by using the “slug”-field from the CMS (you can take any other field from the CMS for that or even create an extra field, but the slug does the job).
(2) Then scroll to the first Collection List Item an add another “custom code” element at the point where you want to scroll on click. Set the “id” to the same CMS-field as above.