What a version 4 UUID is
A UUID is a 128-bit identifier written as 32 hexadecimal digits in five groups, for example 123e4567-e89b-42d3-a456-426614174000. In version 4, 122 of the bits are random, and the digit at the start of the third group is always 4.
Uniqueness
With 122 random bits, the chance of generating the same UUID twice is negligible for practical purposes, so UUIDs can be created independently on many machines without coordination. They use your browser's secure random generator (crypto.randomUUID).
When not to use them
Random UUIDs make poor database primary keys on some systems because inserts are not ordered. For sortable identifiers consider time-ordered variants such as UUID v7 or ULID.