What are you trying to do, and what are you getting stuck on?
The UID code just makes a unique identifier. This is e.g. useful when you want to have identifiers in your html or svg code, but don’t want them to collide with others embedded on the same page.
If you call DOM.uid() once you get an object containing as property id the string "O-1". Call it again to get “O-2”. If you pass in a string it will be part of the unique identifier. e.g. call DOM.uid('foo') the third time and you get the string "O-foo-3". Etc.
If you want you can construct unique identifiers using whatever other method you prefer.
All it does is generates a unique ID (increments the counter at the end for every invocation, with the counter kept globally throughout the notebook). When you include multiple SVGs directly into the DOM of a single web page, you otherwise end up with name collisions between two different elements with the same ID.
In old versions of Safari, SVG references by ID for an SVG included in an HTML DOM also don’t resolve, but it worked fine to reference SVG elements as full paths using DOM.uid("foo").toString() which is the same as `url(${urlDOM.uid("foo").href})`