Unique value per instance of Block

I have a block I’m creating that has a modal inside it. I need a value that can be used multiple times within the block but be unique between instances of that block. Is there a way to generate that? Or grab the node value of the Block’s instance?

I need to use it as the button’s target value and the modal’s ID so they are linked. But I need it to be unique every time a block is put on the page so each one triggers the correct modal.

Thoughts?

I see that in the legacy controls I can use {{ wrapper-class }} which is great because I’m still using them.

But if someone weren’t using them, what would you use?