UUID v4 vs v7 — which should I use?
v4 is 122 bits of pure randomness. It is the default almost everywhere and is ideal when IDs must not reveal anything.
v7 starts with a millisecond timestamp, so IDs created later sort after earlier ones. That keeps database indexes compact and fast, which makes v7 a great choice for primary keys in Postgres, MySQL and other B-tree databases.
Are these UUIDs really unique?
They are generated with your browser's cryptographically secure random number generator (crypto.getRandomValues). The chance of two v4 UUIDs colliding is so small it can be ignored for practical purposes.