How do I store information in a dynamic block in WordPress?

The answer to my own questions is that you can’t. When you create a dynamic block you depend on the server side (PHP) entirely to generate the content and then JS can rebuild from the HTML but you cannot have this occur the other way around.

So unless I create a custom table or can get the data from an API where PHP can access it before JS there is no way to achieve what I wanted.