The versions solve different problems
A UUID is 128 bits written as 36 characters, and the version digit tells you how those bits were chosen. Version 4 is 122 random bits and is the default for almost everything - it needs no coordination, leaks nothing about where it was made, and collisions are not a practical concern. Version 7, standardised in RFC 9562 in 2024, puts a 48-bit Unix millisecond timestamp in the high bits followed by randomness, so identifiers sort chronologically while remaining unguessable.
That sortability is the reason v7 exists and it matters more than it sounds. Database indexes on random keys suffer because every insert lands at a random point in the B-tree, scattering writes across pages and fragmenting the index. Time-ordered keys append at the end, keeping inserts sequential and the index compact. On a high-write table the difference is substantial, which is why v7 has quickly become the recommendation for new primary keys.
Versions 1 and 6 are also time-based but include the machine's MAC address, which leaks hardware identity - a real privacy consideration and the reason v1 fell out of favour. Versions 3 and 5 are deterministic: they hash a namespace and a name, so the same input always yields the same UUID. That is useful for deriving stable identifiers from existing keys, with v5 preferred since it uses SHA-1 rather than MD5.